I am using local notifications in a app I’m making.
I use this:
Class myClass = NSClassFromString(@"UILocalNotification");
if (myClass) {
//Local Notification code
}
To avoid using UILocalNotifications when not supported.
But my app crashes on launch with this error code:
warning: Unable to read symbols for
“/Library/MobileSubstrate/MobileSubstrate.dylib”
(file not found). dyld: Symbol not
found:
_OBJC_CLASS_$_UILocalNotification Referenced from:
/var/mobile/Applications/FCFFFCB2-A60B-4A8D-B19B-C3F5DE93DAD2/MyApp.app/MyApp
Expected in:
/System/Library/Frameworks/UIKit.framework/UIKitData Formatters temporarily
unavailable, will re-try after a
‘continue’. (Not safe to call dlopen
at this time.)
mi_cmd_stack_list_frames: Not enough
frames in stack.
mi_cmd_stack_list_frames: Not enough
frames in stack.
How can i prevent this?
The proper way to do this is:
You can not use
[UILocalNotificationClass alloc]because that will cause Link Errors when your code is loaded on an older iOS where the class is not available. And that is exactly what you are trying to prevent.BTW: Those MobileSubstrate errors are what you get when you jailbreak your phone: an unpredictable/undefined development platform 🙂