开发者

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 sayin开发者_如何学JAVAg:

dyld: Symbol not found: _UIApplicationLaunchOptionsLocalNotificationKey

What should be done? What can be wrong?


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜