react-native-macos 0.66.8 → 0.66.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/React/Base/RCTVersion.m +1 -1
- package/React/CoreModules/RCTAlertController.m +8 -4
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/package.json +1 -1
- package/template/package.json +1 -1
package/React/Base/RCTVersion.m
CHANGED
|
@@ -32,12 +32,16 @@
|
|
|
32
32
|
|
|
33
33
|
- (void)show:(BOOL)animated completion:(void (^)(void))completion
|
|
34
34
|
{
|
|
35
|
-
[self.alertWindow makeKeyAndVisible];
|
|
36
|
-
|
|
37
35
|
// [TODO(macOS GH#774)
|
|
36
|
+
// Call self.alertWindow to ensure that it gets populated
|
|
37
|
+
UIWindow *alertWindow = self.alertWindow;
|
|
38
|
+
|
|
38
39
|
// If the window is tracked by our application then it will show the alert
|
|
39
|
-
if ([[[UIApplication sharedApplication] windows] containsObject:
|
|
40
|
-
|
|
40
|
+
if ([[[UIApplication sharedApplication] windows] containsObject:alertWindow]) {
|
|
41
|
+
// On iOS 14, makeKeyAndVisible should only be called if alertWindow is tracked by the application.
|
|
42
|
+
// Later versions of iOS appear to already do this check for us behind the scenes.
|
|
43
|
+
[alertWindow makeKeyAndVisible];
|
|
44
|
+
[alertWindow.rootViewController presentViewController:self animated:animated completion:completion];
|
|
41
45
|
} else {
|
|
42
46
|
// When using Scenes, we must present the alert from a view controller associated with a window in the Scene. A fresh window (i.e. _alertWindow) cannot show the alert.
|
|
43
47
|
[RCTPresentedViewController() presentViewController:self animated:animated completion:completion];
|
package/package.json
CHANGED