Repository navigation
Conversation
The SDK 58 AppDelegate no longer creates a UIWindow; SceneDelegate does. The config plugin now inserts the theme recovery before didFinishLaunching returns when there is no window creation to anchor to, and the recovered theme is applied to windows that become visible later. Fixes vonovak#58
plrdev
marked this pull request as ready for review
October 6, 2026 11:31
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.
Fixes #58
Expo SDK 58 moved to the scene-based life cycle: the AppDelegate no longer creates a
UIWindow,SceneDelegatedoes. That broke the library in two ways:window = UIWindow(frame: UIScreen.main.bounds).recoverApplicationTheme()now runs indidFinishLaunching, before any window exists, soforceThemehad no windows to style. JS got the right scheme (viaRCTOverrideAppearancePreference), but the window kept following the system, so status bar, alerts and pickers were in the wrong theme until the nextsetThemePreferencecall.Changes
return super.application(application, didFinishLaunchingWithOptions: launchOptions). Older AppDelegates keep the existing anchor, so their generated code is unchanged.forceThemealso applies the forced style to windows that become visible later (UIWindowDidBecomeVisibleNotification, observer registered once). Nothing changes when the style is unspecified.Testing
On a fresh
blank-typescript@sdk-58app (expo 58.0.4, RN 0.88.0-rc.3, Xcode 27.1, iOS 27.1 simulator):expo prebuildsucceeds; the recovery lands above thereturn.Alertis dark. With the plugin fix alone (old native code), JS is dark but the native alert is light.yarn test,yarn typescriptandyarn lintpass.Side note, not addressed here: the
react-native: >=0.79.0peer range doesn't match RN prereleases like0.88.0-rc.3, so npm needs--legacy-peer-depson SDK 58 for now.