You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## 📜 Description
This PR updates the top window retrieval method:
Old: `UIApplication.shared.windows.last` (deprecated in iOS 15+)
New: `UIWindowScene`-based approach
Differences:
- `UIApplication.shared.windows.last`:
- It accesses all windows associated with the application.
- The last window in this array isn't always the topmost or key window,
especially in more complex app setups.
- This approach is deprecated as of iOS 15, though it still works in
many cases.
- `UIWindowScene`:
- Iterates through all connected scenes to find the active foreground
scene
- Ensures selection of the correct key window in multi-window
environments (e.g., Split View in iPadOS)
- Provides more reliable behaviour in complex app configurations that
utilize multiple `UIWindowScenes`
## 💡 Motivation and Context
Closes#618
In our case, this change was required to get the children of the
`OverKeyboardView` to show. Without it, they were still rendered, but
invisible. This change should enhance the reliability across different
iOS versions and device types.
## 📢 Changelog
### iOS
- Get the last key window in the current `UIWindowScene` as opposed to
the last window of all windows associated with the app
## 🤔 How Has This Been Tested?
It works on my company project. Did not manage to get the example app to
compile on my machine. Could be due to the (lack of) provisioning
profiles.
## 📝 Checklist
- [x] CI successfully passed
- [x] I added new mocks and corresponding unit-tests if library API was
changed
0 commit comments