Fix tvOS build issues with UIDeviceOrientation

Summary: Closes https://github.com/facebook/react-native/pull/15212

Differential Revision: D5498553

Pulled By: javache

fbshipit-source-id: 7276d836bd544d8a83b9e1711ea66044de9e9269
This commit is contained in:
Pieter De Baets 2017-07-26 11:33:24 -07:00 committed by Facebook Github Bot
parent 2fda10112f
commit 6d5772681f
1 changed files with 4 additions and 0 deletions

View File

@ -152,10 +152,12 @@ RCT_EXPORT_MODULE()
selector:@selector(didReceiveNewContentSizeMultiplier)
name:RCTAccessibilityManagerDidUpdateMultiplierNotification
object:_bridge.accessibilityManager];
#if !TARGET_OS_TV
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(namedOrientationDidChange)
name:UIDeviceOrientationDidChangeNotification
object:nil];
#endif
[RCTLayoutAnimation initializeStatics];
}
@ -177,6 +179,7 @@ RCT_EXPORT_MODULE()
});
}
#if !TARGET_OS_TV
// Names and coordinate system from html5 spec:
// https://developer.mozilla.org/en-US/docs/Web/API/Screen.orientation
// https://developer.mozilla.org/en-US/docs/Web/API/Screen.lockOrientation
@ -222,6 +225,7 @@ static NSDictionary *deviceOrientationEventBody(UIDeviceOrientation orientation)
body:deviceOrientationEventBody(deviceOrientation)];
#pragma clang diagnostic pop
}
#endif
dispatch_queue_t RCTGetUIManagerQueue(void)
{