-
Notifications
You must be signed in to change notification settings - Fork 267
Closed
Labels
Description
It seems [OneSignal initWithLaunchOptions:appId:handleNotificationAction:settings:] crashes on iOS 7 since release > 2.3.5.
It's fixed if you in OneSignal.m replace
else
[self registerForAPNsToken];
with
else if ([[UIApplication sharedApplication] respondsToSelector:@selector(registerForRemoteNotifications)])
[self registerForAPNsToken];
But would that break push notification delivery on iOS 7 for some users?
Stack trace with release 2.3.7.
Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x2ee69fd3 __exceptionPreprocess
1 libobjc.A.dylib 0x396e2ccf objc_exception_throw
2 CoreFoundation 0x2ee6d967 -[NSObject(NSObject) doesNotRecognizeSelector:]
3 CoreFoundation 0x2ee6c253 ___forwarding___
4 CoreFoundation 0x2edbb7b8 _CF_forwarding_prep_0
5 Fanmiles 0x4516cb +[OneSignal registerForAPNsToken] (OneSignal.m:358)
6 Fanmiles 0x450c07 +[OneSignal initWithLaunchOptions:appId:handleNotificationReceived:handleNotificationAction:settings:] (OneSignal.m:230)
7 Fanmiles 0x45002d +[OneSignal initWithLaunchOptions:appId:handleNotificationAction:settings:] (OneSignal.m:159)