Skip to content

Commit 74b667d

Browse files
tido64facebook-github-bot
authored andcommitted
iOS: Fix RCTDevLoadingView not showing up with UIScene (#27916)
Summary: Attaches the loading view to a `UIScene` in apps using the new Scenes API (iOS 13+). ## Changelog [iOS] [Fixed] - Fix RCTDevLoadingView not showing up with UIScene Pull Request resolved: #27916 Test Plan: Create a new app based on UIScene and integrate React Native. | Before | After | |:------:|:------:| | <img width="453" alt="image" src="https://user-images.githubusercontent.com/4123478/73485717-eccfe800-43a3-11ea-96fd-f7077a348345.png"> | <img width="453" alt="image" src="https://user-images.githubusercontent.com/4123478/73485749-f9ecd700-43a3-11ea-8a18-2e2185e62e78.png"> | Reviewed By: PeteTheHeat Differential Revision: D20104655 Pulled By: hramos fbshipit-source-id: 86c1902c00f791fd23f75ea7562b44c92e719c5e
1 parent 7d2daa0 commit 74b667d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

React/DevSupport/RCTDevLoadingView.m

+5
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ - (void)setBridge:(RCTBridge *)bridge
9494
self->_label.textColor = color;
9595
self->_window.backgroundColor = backgroundColor;
9696
self->_window.hidden = NO;
97+
98+
if (@available(iOS 13.0, *)) {
99+
id scene = [[RCTSharedApplication() valueForKey:@"connectedScenes"] anyObject];
100+
[self->_window setValue:scene forKey:@"windowScene"];
101+
}
97102
});
98103
}
99104

0 commit comments

Comments
 (0)