-
Notifications
You must be signed in to change notification settings - Fork 24.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[iOS 7.1.2][0.29.0] RCTPushNotificationManager throws NSInvalidArgumentException [UIConcreteLocalNotification category] #8662
Comments
I am having the same problem. Does iOS 7.1.2 not support categories for notifications? |
Yes, categories came with iOS 8. Could anyone patch this? Right now, Notifications are unusable in iOS 7. |
I have absolutely no idea what i am doing in objective-c, but would something like: #define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0")) {
notification.category = [RCTConvert NSString:details[@"category"]];
}
...
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0")) {
formattedLocalNotification[@"category"] = RCTNullIfNil(notification.category);
} be sufficient? |
Yes, that should do it! |
Sorry @jan-happy, only have time for dealing with my own bugs for the moment. :) Agree this should be fixed though! |
@jan-happy It looks like this is now moot. React native v0.34 drops iOS 7 support: 07553d0 |
Hi @jan-happy, I'm closing this issue since RN no longer supports iOS 7. Were you able to find a suitable workaround? |
Tested my app on an old iPhone 4 with the latest iOS Version for it.
Runs fine on other devices with iOS 8&9, but raises this exception on iOS 7.1.2
Commenting out line 45 and 75 in RCTPushNotificationManager.m fixed it for me since I don't need categories in my local push notifications.
The text was updated successfully, but these errors were encountered: