react-native-splash-screen
react-native-splash-screen copied to clipboard
React Native 0.73 Integration in Xcode
-
(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.moduleName = @"dhignaevents"; // You can add your custom initial props in the dictionary below. // They will be passed down to the ViewController used by React Native. // [RNSplashScreen showSplash:@"LaunchScreen" inRootView:rootView]; self.initialProps = @{}; [RNSplashScreen show];
return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
stuck in splash screen any idea to solve
@city0666 try this!
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.moduleName = @"dhignaevents";
self.initialProps = @{};
bool didLaunchFinish = [super application:application didFinishLaunchingWithOptions:launchOptions];
[RNSplashScreen show];
return didLaunchFinish;
}
its working fine thanks
@city0666 try this!
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.moduleName = @"dhignaevents"; self.initialProps = @{}; bool didLaunchFinish = [super application:application didFinishLaunchingWithOptions:launchOptions]; [RNSplashScreen show]; return didLaunchFinish; }
This worked for me. Thanks!
btw I don't mean to hijack your post, but did you manage to integrate for android in RN 0.73.+ with their new MainActivity and MainApplication kotlin files (instead of java)?
@manjuy124 if you pass by... :)
@city0666 try this!
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.moduleName = @"dhignaevents"; self.initialProps = @{}; bool didLaunchFinish = [super application:application didFinishLaunchingWithOptions:launchOptions]; [RNSplashScreen show]; return didLaunchFinish; }
wow, Magical. But why does this work?? 🤔
Does anyone know what the magic behind this is?
duplicate issue : #606
@city0666 try this!
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.moduleName = @"dhignaevents"; self.initialProps = @{}; bool didLaunchFinish = [super application:application didFinishLaunchingWithOptions:launchOptions]; [RNSplashScreen show]; return didLaunchFinish; }wow, Magical. But why does this work?? 🤔
Does anyone know what the magic behind this is?
@JoseVov The answer lies in the issue #606
When i try this, i get the error No visible @interface for 'UIResponder' declares the selector 'application:didFinishLaunchingWithOptions:'. I've tried another solution and it seems to have the same issue with the [super ...] part of it. Any ideas?
Same issue was brought up in #606 here and doesn't appear to be addressed.