-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alerts not showing iOS 13+ Scenedelegate + Multiwindow Support enabled #31251
Comments
@tanakaderoy because you are using 'Scenes' with 'react-native', I just want to ask you if now with the 'iOS 15' and it's new feature 'prewarming', do you have any problems on your app's launch ? |
Seem as of now we can not use SceneDelegate. I have the same issue. I convert my React Native objective-c to a swift template. When use SceneDelegate I get the same problem. Sometimes the Alert will show and some time it will not. Once I put my code into AppDelete problem was fixed. |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This issue was closed because it has been stalled for 7 days with no activity. |
Description
On an iOS project using the new SceneDelegate and have multiwindow support turned on the
Alert.alert()
function is not working anymore. Seems like the change to use the new RCTAlertController in #29295 introduced the issue. Making the window via_alertWindow = [[UIWindow alloc] initWithFrame:RCTSharedApplication().keyWindow.bounds];
seems to be the problem. I have found a workaround of replacing the _alertWindow initialisation with this:That allows the Alerts to show on both projects using regular Appdelegate & projects using the Scenedelegate
React Native version:
Run
react-native info
in your terminal and copy the results here.Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
Expected Results
Alerts should be showing on iOS 13+
Snack, code example, screenshot, or link to a repository:
Here is a small repo that just shows the problem RNiOSAlertIssue
it has 2 branches main and AlertWorkingNoMultiWindow. main has the Scenedelegate changes. AlertWorkingNoMultiWindow branch is the repo before any scenedelegate changes or enabling multi window.
You may provide a screenshot of the application if you think it is relevant to your bug report.
Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve
The text was updated successfully, but these errors were encountered: