diff --git a/packages/rn-tester/RNTester/AppDelegate.mm b/packages/rn-tester/RNTester/AppDelegate.mm index 7217807c122..22166bba864 100644 --- a/packages/rn-tester/RNTester/AppDelegate.mm +++ b/packages/rn-tester/RNTester/AppDelegate.mm @@ -7,7 +7,9 @@ #import "AppDelegate.h" +#if !TARGET_OS_TV #import +#endif #import #import @@ -15,7 +17,9 @@ #import #import +#if !TARGET_OS_TV #import +#endif #import #ifndef RN_DISABLE_OSS_PLUGIN_HEADER @@ -35,8 +39,13 @@ static NSString *kBundlePath = @"js/RNTesterApp.ios"; +#if !TARGET_OS_TV @interface AppDelegate () @end +#else +@interface AppDelegate () +@end +#endif @implementation AppDelegate @@ -63,7 +72,9 @@ static NSString *kBundlePath = @"js/RNTesterApp.ios"; initialProperties:[self prepareInitialProps] launchOptions:launchOptions]; +#if !TARGET_OS_TV [[UNUserNotificationCenter currentNotificationCenter] setDelegate:self]; +#endif return YES; } @@ -102,6 +113,7 @@ static NSString *kBundlePath = @"js/RNTesterApp.ios"; return [super getTurboModule:name jsInvoker:jsInvoker]; } +#if !TARGET_OS_TV // Required for the remoteNotificationsRegistered event. - (void)application:(__unused UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken @@ -145,6 +157,7 @@ static NSString *kBundlePath = @"js/RNTesterApp.ios"; [RCTPushNotificationManager didReceiveNotification:notification]; completionHandler(); } +#endif #pragma mark - New Arch Enabled settings