mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-21 10:34:31 +08:00
Apple TV support 1: existing Objective C code should compile for tvOS
Summary: First commit for Apple TV support: changes to existing Objective-C code so that it will compile correctly for tvOS. Closes https://github.com/facebook/react-native/pull/9649 Differential Revision: D3916021 Pulled By: javache fbshipit-source-id: 34acc9daf3efff835ffe38c43ba5d4098a02c830
This commit is contained in:
committed by
Facebook Github Bot 5
parent
339531065f
commit
d368ebfab2
@@ -19,7 +19,9 @@
|
||||
#import "RCTJavaScriptLoader.h"
|
||||
#import "RCTLinkingManager.h"
|
||||
#import "RCTRootView.h"
|
||||
#if !TARGET_OS_TV
|
||||
#import "RCTPushNotificationManager.h"
|
||||
#endif
|
||||
|
||||
@interface AppDelegate() <RCTBridgeDelegate>
|
||||
|
||||
@@ -79,6 +81,8 @@
|
||||
|
||||
# pragma mark - Push Notifications
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
|
||||
// Required to register for notifications
|
||||
- (void)application:(__unused UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings
|
||||
{
|
||||
@@ -109,4 +113,6 @@
|
||||
[RCTPushNotificationManager didReceiveLocalNotification:notification];
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
@@ -64,7 +64,9 @@ RCT_EXPORT_MODULE();
|
||||
[_resizableRootView setSizeFlexibility:RCTRootViewSizeFlexibilityHeight];
|
||||
|
||||
_currentSizeTextView = [UITextView new];
|
||||
#ifndef TARGET_OS_TV
|
||||
_currentSizeTextView.editable = NO;
|
||||
#endif
|
||||
_currentSizeTextView.text = @"Resizable view has not been resized yet";
|
||||
_currentSizeTextView.textColor = [UIColor blackColor];
|
||||
_currentSizeTextView.backgroundColor = [UIColor whiteColor];
|
||||
|
||||
Reference in New Issue
Block a user