Commit 7134021
fix(iOS): Check for multiple screens while changing screen orientation (software-mansion#2035)
## Description
This fixes two issues with scenes on iOS:
1. A casting issue, which allows non-window scenes on iOS, e.g.
CarPlay's CPTemplateApplicationScene
3. An assumed loading order - the UIWindowScene is not guaranteed to be
the first scene (or even present) in a multi-scene app
Fixes software-mansion#1857
**Edit:** I originally reported that this would only fix the second
crash reported in software-mansion#1857. Upon review of the first crash in that issue, I
believe this PR actually addresses both crashes.
## Test code and steps to reproduce
There really isn't any simple code that can be used to test this, as
this scenario requires having an app that implements multiple scenes, at
least one of which being CarPlay. It would be several hundred lines of
code.
## Checklist
- [x] Ensured that CI passes1 parent 993c1dc commit 7134021
1 file changed
+15
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
146 | 160 | | |
147 | 161 | | |
148 | 162 | | |
| |||
0 commit comments