white screen in iOS device when deploying on staging and production
See original GitHub issueIs this a bug report?
yes
Have you read the Contributing Guidelines?
yes
Environment
Steps to Reproduce
(Write your steps here:)
- 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
- 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]; }
(Write what happened. Add screenshots!)
Reproducible Demo
(Paste the link to an example project and exact instructions to reproduce the issue.)
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:12
I have same problem.
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?