Close Menu
  • Home
  • AI
  • Big Data
  • Cloud Computing
  • iOS Development
  • IoT
  • IT/ Cybersecurity
  • Tech
    • Nanotechnology
    • Green Technology
    • Apple
    • Software Development
    • Software Engineering

Subscribe to Updates

Get the latest technology news from Bigteetechhub about IT, Cybersecurity and Big Data.

    What's Hot

    Chinese Buses, European Fears, and the Truth About Connected Fleets

    November 11, 2025

    Google’s Plan to Fix a Broken System

    November 11, 2025

    swift – IOS app not opened or prompted to open when Universal Link used

    November 10, 2025
    Facebook X (Twitter) Instagram
    Facebook X (Twitter) Instagram
    Big Tee Tech Hub
    • Home
    • AI
    • Big Data
    • Cloud Computing
    • iOS Development
    • IoT
    • IT/ Cybersecurity
    • Tech
      • Nanotechnology
      • Green Technology
      • Apple
      • Software Development
      • Software Engineering
    Big Tee Tech Hub
    Home»iOS Development»ios – How to fix error: Fatal error: Cannot find the keyWindow. Make sure to call `window.makeKeyAndVisible()`.?
    iOS Development

    ios – How to fix error: Fatal error: Cannot find the keyWindow. Make sure to call `window.makeKeyAndVisible()`.?

    big tee tech hubBy big tee tech hubOctober 18, 2025023 Mins Read
    Share Facebook Twitter Pinterest Copy Link LinkedIn Tumblr Email Telegram WhatsApp
    Follow Us
    Google News Flipboard
    ios – How to fix error: Fatal error: Cannot find the keyWindow. Make sure to call `window.makeKeyAndVisible()`.?
    Share
    Facebook Twitter LinkedIn Pinterest Email Copy Link


    I have upgraded my expo and react native and now I am getting “EXDevLauncher/ExpoDevLauncherAppDelegateSubscriber.swift:8: Fatal error: Cannot find the keyWindow. Make sure to call window.makeKeyAndVisible().” while building my app in Xcode. I tried to solve it by somehow changing AppDelegate.m file, but it didn’t worked. Here are the AppDelegate and SceneDelegate files. I found out that they can cause it so I post them there, but if more files are needed let me know:`

    #import 
    #import 
    #import 
    
    @interface AppDelegate : EXAppDelegateWrapper
    
    @end
    
    

    `

    #import "AppDelegate.h"
    // @generated begin react-native-maps-import - expo prebuild (DO NOT MODIFY) sync-f2f83125c99c0d74b42a2612947510c4e08c423a
    #if __has_include()
    #import 
    #endif
    // @generated end react-native-maps-import
    
    #import 
    #import 
    
    @implementation AppDelegate
    
    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
    #if __has_include()
      [GMSServices provideAPIKey:@"AIzaSyCDnK85Y_BEl8g-tdrdSl8eC2VGotnEB5k"];
    #endif
      
      self.moduleName = @"main";
      self.initialProps = @{};
    
      NSLog(@"[AppDelegate] didFinishLaunching begin");
      
      // Call super but WITHOUT creating a window (SceneDelegate will do that)
      BOOL result = [super application:application didFinishLaunchingWithOptions:launchOptions];
      NSLog(@"[AppDelegate] didFinishLaunching end");
      return result;
    }
    
    - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
    {
    #if DEBUG
      return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
    #else
      return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
    #endif
    }
    
    // Explicitly define remote notification delegates to ensure compatibility with some third-party libraries
    - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
    {
      return [super application:application didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
    }
    
    // Explicitly define remote notification delegates to ensure compatibility with some third-party libraries
    - (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
    {
      return [super application:application didFailToRegisterForRemoteNotificationsWithError:error];
    }
    
    // Explicitly define remote notification delegates to ensure compatibility with some third-party libraries
    - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler
    {
      return [super application:application didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];
    }
    
    @end
    
    
    #import 
    
    #import "AppDelegate.h"
    
    int main(int argc, char * argv[]) {
      @autoreleasepool {
        return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
      }
    }
    
    
    
    #import "SceneDelegate.h"
    #import 
    #import 
    #import 
    #import "AppDelegate.h"
    
    @implementation SceneDelegate
    
    - (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions {
      if (![scene isKindOfClass:[UIWindowScene class]]) { return; }
      UIWindowScene *windowScene = (UIWindowScene *)scene;
    
      NSLog(@"[SceneDelegate] willConnectToSession");
    
      // Create window for this scene
      self.window = [[UIWindow alloc] initWithWindowScene:windowScene];
      
      NSLog(@"[SceneDelegate] window created");
      
      // Get AppDelegate for dev launcher delegate
      AppDelegate *appDelegate = (AppDelegate *)UIApplication.sharedApplication.delegate;
      
      // Make window visible AFTER dev launcher is initialized
      [self.window makeKeyAndVisible];
      NSLog(@"[SceneDelegate] window makeKeyAndVisible called");
      
      // NOW start dev launcher with the window
      NSLog(@"[SceneDelegate] EXDevLauncherController startWithWindow called");
      EXDevLauncherController *controller = [EXDevLauncherController sharedInstance];
      [controller startWithWindow:self.window delegate:appDelegate launchOptions:nil];
      
      NSLog(@"[SceneDelegate] setup complete, window is key and visible");
    }
    
    - (void)sceneDidDisconnect:(UIScene *)scene {
      NSLog(@"[SceneDelegate] sceneDidDisconnect");
    }
    
    - (void)sceneDidBecomeActive:(UIScene *)scene {
      NSLog(@"[SceneDelegate] sceneDidBecomeActive");
    }
    
    - (void)sceneWillResignActive:(UIScene *)scene {
      NSLog(@"[SceneDelegate] sceneWillResignActive");
    }
    
    - (void)sceneWillEnterForeground:(UIScene *)scene {
      NSLog(@"[SceneDelegate] sceneWillEnterForeground");
    }
    
    - (void)sceneDidEnterBackground:(UIScene *)scene {
      NSLog(@"[SceneDelegate] sceneDidEnterBackground");
    }
    
    @end
    
    
    #import 
    #import "AppDelegate.h"
    #import "SceneDelegate.h"
    
    // This category supplies a UIScene configuration at runtime so the app
    // uses SceneDelegate even if Info.plist doesn't declare UIApplicationSceneManifest.
    @implementation AppDelegate (SceneConfiguration)
    
    - (UISceneConfiguration *)application:(UIApplication *)application
     configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession
                                  options:(UISceneConnectionOptions *)options
    {
      UISceneConfiguration *config = [UISceneConfiguration configurationWithName:@"Default Configuration"
                                                                     sessionRole:connectingSceneSession.role];
      config.delegateClass = [SceneDelegate class];
      return config;
    }
    
    - (void)application:(UIApplication *)application didDiscardSceneSessions:(NSSet *)sceneSessions
    {
      // No-op. Implemented to fully adopt UIScene lifecycle.
    }
    
    @end
    
    



    Source link

    call Error Fatal Find Fix iOS keyWindow window.makeKeyAndVisible
    Follow on Google News Follow on Flipboard
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email Copy Link
    tonirufai
    big tee tech hub
    • Website

    Related Posts

    Google’s Plan to Fix a Broken System

    November 11, 2025

    swift – IOS app not opened or prompted to open when Universal Link used

    November 10, 2025

    android – MissingPluginException(No implementation found for method OneSignal#initialize on channel OneSignal

    November 9, 2025
    Add A Comment
    Leave A Reply Cancel Reply

    Editors Picks

    Chinese Buses, European Fears, and the Truth About Connected Fleets

    November 11, 2025

    Google’s Plan to Fix a Broken System

    November 11, 2025

    swift – IOS app not opened or prompted to open when Universal Link used

    November 10, 2025

    A new era and new features in Azure Ultra Disk

    November 10, 2025
    About Us
    About Us

    Welcome To big tee tech hub. Big tee tech hub is a Professional seo tools Platform. Here we will provide you only interesting content, which you will like very much. We’re dedicated to providing you the best of seo tools, with a focus on dependability and tools. We’re working to turn our passion for seo tools into a booming online website. We hope you enjoy our seo tools as much as we enjoy offering them to you.

    Don't Miss!

    Chinese Buses, European Fears, and the Truth About Connected Fleets

    November 11, 2025

    Google’s Plan to Fix a Broken System

    November 11, 2025

    Subscribe to Updates

    Get the latest technology news from Bigteetechhub about IT, Cybersecurity and Big Data.

      • About Us
      • Contact Us
      • Disclaimer
      • Privacy Policy
      • Terms and Conditions
      © 2025 bigteetechhub.All Right Reserved

      Type above and press Enter to search. Press Esc to cancel.