We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 684c8a0 commit d5fab0bCopy full SHA for d5fab0b
ios/SafeAreaView/RNCSafeAreaProviderManager.m
@@ -20,8 +20,10 @@ - (UIView *)view
20
21
- (NSDictionary *)constantsToExport
22
{
23
- UIWindow *window = [[UIApplication sharedApplication] keyWindow];
24
- if (@available(iOS 11.0, *)) {
+ UIWindow *window = RCTKeyWindow();
+ if (window == nil) {
25
+ return @{@"initialWindowMetrics" : [NSNull null]};
26
+ } else if (@available(iOS 11.0, *)) {
27
UIEdgeInsets safeAreaInsets = window.safeAreaInsets;
28
return @{
29
@"initialWindowMetrics" : @{
0 commit comments