From c5ea18f7389fe821e7a9882e4b1b30b0a1b266f4 Mon Sep 17 00:00:00 2001 From: zhongwuzw Date: Fri, 26 Jul 2019 06:13:54 -0700 Subject: [PATCH] Don't call sharedApplication in App Extension (#25769) Summary: Fixes https://github.com/facebook/react-native/issues/25767 . ## Changelog [iOS] [Fixed] - Don't call sharedApplication in App Extension Pull Request resolved: https://github.com/facebook/react-native/pull/25769 Test Plan: RN works in App Extension. Reviewed By: cpojer Differential Revision: D16516104 Pulled By: sammy-SC fbshipit-source-id: 446fd1d88724b783b2afb2369783b9a85b5cc178 --- React/Modules/RCTRedBox.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/React/Modules/RCTRedBox.m b/React/Modules/RCTRedBox.m index 7ed4900d319ce7..bb85402099561f 100644 --- a/React/Modules/RCTRedBox.m +++ b/React/Modules/RCTRedBox.m @@ -161,7 +161,7 @@ - (instancetype)initWithFrame:(CGRect)frame - (NSInteger)bottomSafeViewHeight { if (@available(iOS 11.0, *)) { - return [UIApplication sharedApplication].delegate.window.safeAreaInsets.bottom; + return RCTSharedApplication().delegate.window.safeAreaInsets.bottom; } else { return 0; }