NativeKeel ยท React Native fixes

-[AppDelegate window]: unrecognized selector sent to instance

Updated 2026-10-10

The app crashes when a library shows something (a picker, a menu, an ad, a snackbar) or right at launch:

-[AppDelegate window]: unrecognized selector sent to instance

Why. With the UIKit scene life cycle the window belongs to the scene delegate, and AppDelegate has no window property at all. That is the React Native 0.88 template, Expo SDK 58, and Expo SDK 57 with enableSceneSupport. Apps built with the iOS 27 SDK must use scenes (why), so this crash arrives with the move to Xcode 27. Libraries that still find the screen with [UIApplication sharedApplication].delegate.window send a message the AppDelegate no longer answers.

Which libraries. Checked in each library's iOS source (October 2026):

LibraryCrashesFix
@react-native-firebase/messagingat launchupstream PR #9359
react-native-blob-utilopen-in / options menuPR #498
react-native-google-mobile-adsbanners, consent form, ad inspectorPR #911 (approved)
react-native-image-crop-pickeropening the picker or cameraPR #2257
react-native-date-pickeropening the modal pickerPR #978
react-native-contactsclosing the contact formPR #841
react-native-ui-libKeyboardInput dismissKeyboardPR #4053
react-native-snackbarshowing a snackbarPR #220
react-native-printpresenting the print dialogPR #237
rn-fetch-blob, react-native-youtube, react-native-safari-viewvariousunmaintained: switch to a maintained fork or alternative

Upgrade once a release includes the fix. A blob-util and a google-mobile-ads crash were reproduced on a fresh React Native 0.88.0-rc.4 app in the iOS simulator; the others use the same call.

Quickest workaround, in your app. Give the AppDelegate its window property back and set it from the scene delegate, so every library finds a window without patches:

// AppDelegate.swift
var window: UIWindow?

// SceneDelegate.swift, after creating the window
(UIApplication.shared.delegate as? AppDelegate)?.window = window

Or fix the library with patch-package. In the library's iOS file, replace the window lookup with React Native's helpers from <React/RCTUtils.h>, which work with and without scenes:

- UIViewController *root = [UIApplication sharedApplication].delegate.window.rootViewController;
+ UIViewController *root = RCTKeyWindow().rootViewController;

When the code then walks presentedViewController to the top, RCTPresentedViewController() does both in one call. Add #import <React/RCTUtils.h> if the file doesn't have it, then npx patch-package <library>.

Find the library. The crash log names the method that sent the message. Or search your dependencies:

grep -rnE "delegate]?.window|delegate] window]" node_modules/*/ios node_modules/@*/*/ios

npx nativekeel lists the known ones from your package.json, with when each one crashes.

Check your whole app in one command: npx nativekeel
Free, runs locally (your code is not uploaded), no account. It reports this and 80 other upgrade, store, crash and security problems.

Sources