From 63a5086792053c103f5ceeb5c9c7459f0ac55d3d Mon Sep 17 00:00:00 2001 From: Jesse Katsumata Date: Mon, 26 Oct 2020 18:49:42 +0900 Subject: [PATCH] feat: allow mac catalyst build --- ios/RNCPushNotificationIOS.h | 2 +- ios/RNCPushNotificationIOS.m | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) 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