question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

white screen in iOS device when deploying on staging and production

See original GitHub issue

Is this a bug report?

yes

Have you read the Contributing Guidelines?

yes

Environment

Steps to Reproduce

(Write your steps here:)

  1. launching iOS application from simulator or device in my machine works fine 2.when deploying on staging or production iam getting white screen at launch
  2. iam not getting this issue in android

Expected Behavior

(Write what you thought would happen.)

Actual Behavior

white screen cam not understanding . trying to change appdelegate.m like this : NSURL *jsCodeLocation; //#ifdef DEBUG // jsCodeLocation = [NSURL URLWithString:@“http://localhost:8081/index.ios.bundle?platform=ios&dev=true”]; jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@“index” fallbackResource:nil]; //#else // jsCodeLocation = [[NSBundle mainBundle] URLForResource:@“main” withExtension:@“jsbundle”]; //#endif //self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; //self.window.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; //[[RCCManager sharedInstance] initBridgeWithBundleURL:jsCodeLocation launchOptions:launchOptions]; but now i am blocked in splashScreen . help please

here is my Appdelegate.m: #import “AppDelegate.h”

#import <React/RCTBundleURLProvider.h> #import <React/RCTRootView.h> #import “RCCManager.h” #import <Smooch/Smooch.h> #import <FBSDKCoreKit/FBSDKCoreKit.h> #import <React/RCTLinkingManager.h> #import <React/RCTPushNotificationManager.h>

@implementation AppDelegate

  • (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { NSURL *jsCodeLocation; //#ifdef DEBUG // jsCodeLocation = [NSURL URLWithString:@“http://localhost:8081/index.ios.bundle?platform=ios&dev=true”]; jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@“index” fallbackResource:nil]; //#else // jsCodeLocation = [[NSBundle mainBundle] URLForResource:@“main” withExtension:@“jsbundle”]; //#endif //self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; //self.window.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; //[[RCCManager sharedInstance] initBridgeWithBundleURL:jsCodeLocation launchOptions:launchOptions]; RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation moduleName:@“homefriend” initialProperties:nil launchOptions:launchOptions]; rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];

    self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; UIViewController *rootViewController = [UIViewController new]; rootViewController.view = rootView; self.window.rootViewController = rootViewController; [self.window makeKeyAndVisible];

    [Smooch initWithSettings: [SKTSettings settingsWithAppToken:@“xxx”]]; [[FBSDKApplicationDelegate sharedInstance] application:application didFinishLaunchingWithOptions:launchOptions]; return YES; }

  • (void)applicationDidBecomeActive:(UIApplication *)application { [FBSDKAppEvents activateApp]; }

  • (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation { [[FBSDKApplicationDelegate sharedInstance] application:application openURL:url sourceApplication:sourceApplication annotation:annotation]; [RCTLinkingManager application:application openURL:url sourceApplication:sourceApplication annotation:annotation]; return YES; }

// Required to register for notifications

  • (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings { [RCTPushNotificationManager didRegisterUserNotificationSettings:notificationSettings]; } // Required for the register event.
  • (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { [RCTPushNotificationManager didRegisterForRemoteNotificationsWithDeviceToken:deviceToken]; } // Required for the registrationError event.
  • (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error { [RCTPushNotificationManager didFailToRegisterForRemoteNotificationsWithError:error]; } // Required for the localNotification event.
  • (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification { [RCTPushNotificationManager didReceiveLocalNotification:notification]; }

@end

(Write what happened. Add screenshots!)

Reproducible Demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:12

github_iconTop GitHub Comments

6reactions
MIt9commented, Nov 7, 2017

I have same problem.

1reaction
DeadPacketscommented, Jan 20, 2018

I have this issue as well, and it’s driving me insane. I have tried everything from manually compiling the main.jsbundle to re-installing all node modules. Any luck?

Read more comments on GitHub >

github_iconTop Results From Across the Web

White screen on production build only iOS - Ionic Forum
When I create a production build the app can't connect to the local ionic server so I get a white screen of death...
Read more >
Xcode Shows after deployment only white screen - ios
Xcode Shows after deployment only white screen ... The simulator / device stays white, the memory usage increases every 1 second by approx....
Read more >
IOS White Screen on Resume - Totally Stumped - Meteor forums
When the application comes into view again it is a blank white screen. No errors, no crashes in xcode, after the white screen...
Read more >
iOS Application White Screen In Production No Code Change
When your app is in production mode, errors will result in a white screen instead of the standard red screen you are familiar...
Read more >
9 Proven Methods to Fix the WordPress White Screen of Death
Nothing is worse than browsing to your WordPress site and suddenly being met with the White Screen of Death (WSoD). This error makes...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found