Post

Replies

Boosts

Views

Activity

Reply to iOS 15: UIApplication.shared.keyWindow is nil, leading to a crash
Hello, Thanks a lot for this answer. I'm using the Application Lifecycle. This answers clearly how to fix this. However, I would like to clarify a point to make sure I understand properly: The key window just returns the window that receives keyboard events, which may or may not be your app's main window depending on the state of the app. Could you point to states where the main window isn't the key window on iOS (I only have a single window defined by myself in my app). Thanks! Bruno
Dec ’21