diff --git a/ios/RNCPushNotificationIOS.h b/ios/RNCPushNotificationIOS.h index 859bcbe42..ddb8c16e7 100644 --- a/ios/RNCPushNotificationIOS.h +++ b/ios/RNCPushNotificationIOS.h @@ -14,7 +14,7 @@ extern NSString *const RNCRemoteNotificationReceived; typedef void (^RNCRemoteNotificationCallback)(UIBackgroundFetchResult result); -#if !TARGET_OS_TV && !TARGET_OS_UIKITFORMAC +#if !TARGET_OS_TV + (void)didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings; + (void)didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken; + (void)didReceiveRemoteNotification:(NSDictionary *)notification; diff --git a/ios/RNCPushNotificationIOS.m b/ios/RNCPushNotificationIOS.m index 3c63eaebc..4158117b6 100644 --- a/ios/RNCPushNotificationIOS.m +++ b/ios/RNCPushNotificationIOS.m @@ -184,11 +184,11 @@ + (UNNotificationCategory *)UNNotificationCategory:(id)json #else @interface RNCPushNotificationIOS () @end -#endif //TARGET_OS_TV / TARGET_OS_UIKITFORMAC +#endif //TARGET_OS_TV @implementation RNCPushNotificationIOS -#if !TARGET_OS_TV && !TARGET_OS_UIKITFORMAC +#if !TARGET_OS_TV /** * Type deprecated in iOS 10.0 @@ -288,7 +288,7 @@ @implementation RNCPushNotificationIOS return formattedResponse; } -#endif //TARGET_OS_TV / TARGET_OS_UIKITFORMAC +#endif //TARGET_OS_TV RCT_EXPORT_MODULE() @@ -297,7 +297,7 @@ - (dispatch_queue_t)methodQueue return dispatch_get_main_queue(); } -#if !TARGET_OS_TV && !TARGET_OS_UIKITFORMAC +#if !TARGET_OS_TV - (void)startObserving { [[NSNotificationCenter defaultCenter] addObserver:self @@ -688,7 +688,7 @@ - (void)handleRemoteNotificationRegistrationError:(NSNotification *)notification } } -#else //TARGET_OS_TV / TARGET_OS_UIKITFORMAC +#else //TARGET_OS_TV RCT_EXPORT_METHOD(onFinishRemoteNotification:(NSString *)notificationId fetchResult:(NSString *)fetchResult) { @@ -774,6 +774,6 @@ - (void)handleRemoteNotificationRegistrationError:(NSNotification *)notification return @[]; } -#endif //TARGET_OS_TV / TARGET_OS_UIKITFORMAC +#endif //TARGET_OS_TV @end diff --git a/package.json b/package.json index a5c01bada..69eeb7ae7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@react-native-community/push-notification-ios", - "version": "1.7.0", + "version": "1.7.1", "description": "React Native Push Notification API for iOS", "main": "js/index.js", "types": "index.d.ts",