Skip to content

Commit 68fce25

Browse files
authored
feat: allow mac catalyst build (#213)
1 parent d983455 commit 68fce25

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

ios/RNCPushNotificationIOS.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ extern NSString *const RNCRemoteNotificationReceived;
1414

1515
typedef void (^RNCRemoteNotificationCallback)(UIBackgroundFetchResult result);
1616

17-
#if !TARGET_OS_TV && !TARGET_OS_UIKITFORMAC
17+
#if !TARGET_OS_TV
1818
+ (void)didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings;
1919
+ (void)didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken;
2020
+ (void)didReceiveRemoteNotification:(NSDictionary *)notification;

ios/RNCPushNotificationIOS.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,11 @@ + (UNNotificationCategory *)UNNotificationCategory:(id)json
184184
#else
185185
@interface RNCPushNotificationIOS () <NativePushNotificationManagerIOS>
186186
@end
187-
#endif //TARGET_OS_TV / TARGET_OS_UIKITFORMAC
187+
#endif //TARGET_OS_TV
188188

189189
@implementation RNCPushNotificationIOS
190190

191-
#if !TARGET_OS_TV && !TARGET_OS_UIKITFORMAC
191+
#if !TARGET_OS_TV
192192

193193
/**
194194
* Type deprecated in iOS 10.0
@@ -288,7 +288,7 @@ @implementation RNCPushNotificationIOS
288288
return formattedResponse;
289289
}
290290

291-
#endif //TARGET_OS_TV / TARGET_OS_UIKITFORMAC
291+
#endif //TARGET_OS_TV
292292

293293
RCT_EXPORT_MODULE()
294294

@@ -297,7 +297,7 @@ - (dispatch_queue_t)methodQueue
297297
return dispatch_get_main_queue();
298298
}
299299

300-
#if !TARGET_OS_TV && !TARGET_OS_UIKITFORMAC
300+
#if !TARGET_OS_TV
301301
- (void)startObserving
302302
{
303303
[[NSNotificationCenter defaultCenter] addObserver:self
@@ -688,7 +688,7 @@ - (void)handleRemoteNotificationRegistrationError:(NSNotification *)notification
688688
}
689689
}
690690

691-
#else //TARGET_OS_TV / TARGET_OS_UIKITFORMAC
691+
#else //TARGET_OS_TV
692692

693693
RCT_EXPORT_METHOD(onFinishRemoteNotification:(NSString *)notificationId fetchResult:(NSString *)fetchResult)
694694
{
@@ -774,6 +774,6 @@ - (void)handleRemoteNotificationRegistrationError:(NSNotification *)notification
774774
return @[];
775775
}
776776

777-
#endif //TARGET_OS_TV / TARGET_OS_UIKITFORMAC
777+
#endif //TARGET_OS_TV
778778

779779
@end

0 commit comments

Comments
 (0)