From cb2453145deaa9f3c6f07532fe26734352e90f3c Mon Sep 17 00:00:00 2001 From: Devan Buggay Date: Tue, 10 Feb 2026 07:44:42 -0800 Subject: [PATCH] Add AppleTV support to RNTester (#55478) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/55478 Changelog: [Internal] Adds a new tvOS binary and platform for RNTester, as well as compile out some unsupported APIs in AppDelegate. Reviewed By: shwanton Differential Revision: D91059550 fbshipit-source-id: 2ec3a283594f3efa5502fa9e33f7d6c0b420fa9a --- packages/rn-tester/RNTester/AppDelegate.mm | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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