diff --git a/RNNotificationActions/RNNotificationActions.m b/RNNotificationActions/RNNotificationActions.m index 1af5f5d..755fa78 100644 --- a/RNNotificationActions/RNNotificationActions.m +++ b/RNNotificationActions/RNNotificationActions.m @@ -75,7 +75,10 @@ - (UIMutableUserNotificationAction *)actionFromJSON:(NSDictionary *)opts UIMutableUserNotificationAction *action; action = [[UIMutableUserNotificationAction alloc] init]; [action setActivationMode: [RCTConvert UIUserNotificationActivationMode:opts[@"activationMode"]]]; - [action setBehavior: [RCTConvert UIUserNotificationActionBehavior:opts[@"behavior"]]]; + + if ([action respondsToSelector:@selector(setBehavior:)]) { + [action setBehavior: [RCTConvert UIUserNotificationActionBehavior:opts[@"behavior"]]]; + } [action setTitle:opts[@"title"]]; [action setIdentifier:opts[@"identifier"]]; [action setDestructive:[RCTConvert BOOL:opts[@"destructive"]]]; @@ -169,4 +172,4 @@ - (void)handleNotificationActionReceived:(NSNotification *)notification body:notification.userInfo]; } -@end \ No newline at end of file +@end diff --git a/RNNotificationActions/RNNotificationActions.xcodeproj/project.pbxproj b/RNNotificationActions/RNNotificationActions.xcodeproj/project.pbxproj index 0e8be22..da9c039 100644 --- a/RNNotificationActions/RNNotificationActions.xcodeproj/project.pbxproj +++ b/RNNotificationActions/RNNotificationActions.xcodeproj/project.pbxproj @@ -169,7 +169,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 7.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -206,7 +206,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 7.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES;