Remove the deprecated isIPhoneX_deprecated constant (#19920)

Summary:
Cleanup the `isIPhoneX_deprecated` constant which was said to be removed by June 1st 2018.
Closes https://github.com/facebook/react-native/pull/19920

Differential Revision: D8714400

Pulled By: hramos

fbshipit-source-id: 0b0b3a2d7b8098baf0474afea230780c79b2fe14
This commit is contained in:
Janic Duplessis 2018-07-02 14:41:49 -07:00 committed by Facebook Github Bot
parent db2159d0b3
commit 3b29274cc1
2 changed files with 0 additions and 45 deletions

View File

@ -64,21 +64,6 @@ class SafeAreaViewExample extends React.Component<
} }
} }
class IsIPhoneXExample extends React.Component<{}> {
render() {
return (
<View>
<Text>
Is this an iPhone X:{' '}
{DeviceInfo.isIPhoneX_deprecated
? 'Yeah!'
: 'Nope. (Or `isIPhoneX_deprecated` was already removed.)'}
</Text>
</View>
);
}
}
exports.examples = [ exports.examples = [
{ {
title: '<SafeAreaView> Example', title: '<SafeAreaView> Example',
@ -86,15 +71,6 @@ exports.examples = [
'SafeAreaView automatically applies paddings reflect the portion of the view that is not covered by other (special) ancestor views.', 'SafeAreaView automatically applies paddings reflect the portion of the view that is not covered by other (special) ancestor views.',
render: () => <SafeAreaViewExample />, render: () => <SafeAreaViewExample />,
}, },
{
title: 'isIPhoneX_deprecated Example',
description:
'`DeviceInfo.isIPhoneX_deprecated` returns true only on iPhone X. ' +
'Note: This prop is deprecated and will be removed right after June 01, 2018. ' +
'Please use this only for a quick and temporary solution. ' +
'Use <SafeAreaView> instead.',
render: () => <IsIPhoneXExample />,
},
]; ];
var styles = StyleSheet.create({ var styles = StyleSheet.create({

View File

@ -51,22 +51,6 @@ RCT_EXPORT_MODULE()
#endif #endif
} }
static BOOL RCTIsIPhoneX() {
static BOOL isIPhoneX = NO;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
RCTAssertMainQueue();
isIPhoneX = CGSizeEqualToSize(
[UIScreen mainScreen].nativeBounds.size,
CGSizeMake(1125, 2436)
);
});
return isIPhoneX;
}
static NSDictionary *RCTExportedDimensions(RCTBridge *bridge) static NSDictionary *RCTExportedDimensions(RCTBridge *bridge)
{ {
RCTAssertMainQueue(); RCTAssertMainQueue();
@ -102,11 +86,6 @@ static NSDictionary *RCTExportedDimensions(RCTBridge *bridge)
{ {
return @{ return @{
@"Dimensions": RCTExportedDimensions(_bridge), @"Dimensions": RCTExportedDimensions(_bridge),
// Note:
// This prop is deprecated and will be removed right after June 01, 2018.
// Please use this only for a quick and temporary solution.
// Use <SafeAreaView> instead.
@"isIPhoneX_deprecated": @(RCTIsIPhoneX()),
}; };
} }