fix: Adopt scene lifecycle in sample apps#8351
Open
denrase wants to merge 9 commits into
Open
Conversation
Adopts the UIKit scene-based lifecycle in sample apps that failed to launch when built with the iOS 27 SDK.
Kept watchOS device support at 8.0, but raised the simulator-only deployment target to 9.0 because Xcode 27 no longer supports watchOS 8 simulators. Also fixed the watchOS sample storyboard module reference so the hosting controller can be instantiated.
📲 Install BuildsiOS
|
Contributor
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 8693a8f | 1222.37 ms | 1249.31 ms | 26.95 ms |
| 71859d3 | 1216.45 ms | 1259.12 ms | 42.67 ms |
| a250b4d | 1217.19 ms | 1250.80 ms | 33.62 ms |
| 3efa7b5 | 1226.55 ms | 1260.66 ms | 34.11 ms |
| 3b7d81f | 1220.53 ms | 1239.06 ms | 18.53 ms |
| 9c19a06 | 1217.77 ms | 1248.98 ms | 31.21 ms |
| ec88236 | 1219.04 ms | 1253.69 ms | 34.65 ms |
| 8bb6aeb | 1232.15 ms | 1260.78 ms | 28.63 ms |
| f82ca9b | 1227.06 ms | 1264.67 ms | 37.61 ms |
| 66415de | 1221.21 ms | 1253.28 ms | 32.07 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 8693a8f | 24.14 KiB | 1.16 MiB | 1.13 MiB |
| 71859d3 | 24.14 KiB | 1.17 MiB | 1.15 MiB |
| a250b4d | 24.14 KiB | 1.22 MiB | 1.20 MiB |
| 3efa7b5 | 24.14 KiB | 1.22 MiB | 1.19 MiB |
| 3b7d81f | 24.14 KiB | 1.22 MiB | 1.20 MiB |
| 9c19a06 | 24.14 KiB | 1.16 MiB | 1.13 MiB |
| ec88236 | 24.14 KiB | 1.15 MiB | 1.13 MiB |
| 8bb6aeb | 24.14 KiB | 1.17 MiB | 1.15 MiB |
| f82ca9b | 24.14 KiB | 1.17 MiB | 1.14 MiB |
| 66415de | 24.14 KiB | 1.16 MiB | 1.13 MiB |
philprime
reviewed
Jul 7, 2026
- remove window refernces from appdelegate - init debug button with windows scene references from SceneDelegate - add helper to find active viewcontroller
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 212cd09. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

#skip-changelog
📜 Description
Adopts the scene-based lifecycle in sample apps that failed to launch when built with the iOS 27 SDK.
Updated affected UIKit/AppDelegate-based samples to include a scene manifest, scene configuration, and scene delegate.
Removes window references from
AppDelegateinstances. Components that needed these (Debug Menu) are now being installed throughSceneDelegate.Introduced a helper to find active window or top controller.
Removed alerts from feedback callbacks, as they were interfering with the feedback, not a valid usecase.
💡 Motivation and Context
Fixes part of #8124
Apps built with the iOS/tvOS/visionOS 27 SDK must adopt the UIKit scene-based lifecycle. Without it, affected samples fail at launch with:
See Apple Technote TN3187:
https://developer.apple.com/documentation/technotes/tn3187-migrating-to-the-uikit-scene-based-life-cycle
Also fixed the watchOS sample storyboard module reference so the hosting controller can be instantiated.
💚 How did you test it?
Tested with Xcode 27 beta 2.
iOS
tvOS
watchOS
visionOS
macOS
I ahve no way currently to test the macOS betas.
macOS-SwiftmacOS-SwiftUImacOS-SwiftUI-SPMmacOS-CLI-Xcode📝 Checklist
You have to check all boxes before merging:
sendDefaultPIIis enabled.