Closed
Description
Please provide all the information requested. Issues that do not follow this format are likely to stall.
Description
Something changed about how UIWindow and the root view controller interact. the _alertWindow
created in RCTAlertController is no longer removed from the screen when nil'd in - (void) hide
. I suspect that somewhere a retain cycle was introduced by the iOS 15 runtime.
React Native version:
System:
OS: macOS 11.6
CPU: (8) x64 Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
Memory: 46.57 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.17.5 - ~/.nvm/versions/node/v14.17.5/bin/node
Yarn: 1.22.11 - ~/.nvm/versions/node/v14.17.5/bin/yarn
npm: 7.23.0 - ~/.nvm/versions/node/v14.17.5/bin/npm
Watchman: 2021.06.07.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.2 - /Users/arahn/.rvm/gems/ruby-2.6.3/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 15.0, DriverKit 20.4, macOS 11.3, tvOS 15.0, watchOS 8.0
Android SDK: Not Found
IDEs:
Android Studio: 4.2 AI-202.7660.26.42.7351085
Xcode: 13.0/13A233 - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_65 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.65.1 => 0.65.1
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
Steps To Reproduce
- Call Alert.alert, e.g.
InteractionManager.runAfterInteractions(() => {
Alert.alert('Delete this post?', 'Are you sure you want to permanently delete this?', [
{
text: 'Cancel',
style: 'cancel',
},
{
onPress: () => someFunction(),
text: 'Delete',
style: 'destructive',
},
])
})
- Run code and dismiss alert.
- Use XCode to pause app execution an look at UIView hierarchy.
Expected Results
You can interact with the app still
There are no extra windows still on the screen after alert is dismissed
Actual Results
all user interaction is blocked. There is a Window and a UIViewController still on the screen.