Parth Bhatt
Parth Bhatt

Reputation: 19469

Error while converting an iPhone app into one universal app (iPhone and iPad)

I have an iPhone app which requires to be a universal app. Common between iPhone and iPad.

I tried running the same app on iPad. It shows error in console saying:

dyld: Symbol not found: _UIApplicationLaunchOptionsLocalNotificationKey

What should be done? What can be wrong?

Upvotes: 1

Views: 191

Answers (2)

DarkDust
DarkDust

Reputation: 92384

The symbol in question was added in iOS 4.0 and is not available on iOS 3.2. You should guard against this (use of a symbol that is not available on iOS 3.2) by using the following code:

if ([[UIDevice currentDevice] respondsToSelector:@selector(multitaskingSupported)]) {
    // Post 4.0, symbol is available.
    // Use UIApplicationLaunchOptionsLocalNotificationKey
} else {
    // Pre 4.0, symbol is not available.
    // Do not reference the symbol here.
}

You will likely stumble upon other symbols that are only available since iOS 4.0, you can use the code in all these places.

Upvotes: 1

Warrior
Warrior

Reputation: 39384

UILocalNotification is a special feature introduced in version 4.0 and later.If you want to use for Ipad update your version to 4.2 which supports UILocalNotification.For Ipad 3.2 only Push-notification is available.

All the best.

Upvotes: 2

Related Questions