React-native-splash-screen: Splashscreen iOS implementation

Created on 20 Feb 2020  路  7Comments  路  Source: crazycodeboy/react-native-splash-screen

Hi this code for ios seems like it needs some review.
https://github.com/crazycodeboy/react-native-splash-screen/blob/a6ab78b70e81c8e003f8f109b19c7324ebb2e487/ios/SplashScreen.m#L30

Its preventing apps from using e2e testing libraries.

see detox issue: https://github.com/wix/Detox/issues/400

Most helpful comment

@mbrehme @Abramovick

I'm using this block to initialize SplashScreen to fix the issue:

bool isDetox = [[[NSProcessInfo processInfo] arguments] containsObject: @"-detoxServer"];
if (!isDetox) {
  [RNSplashScreen show];
}

All 7 comments

I ended up adding a release mode flag to the app when it鈥檚 built for e2e testing preventing the splashcreen from showing

@export-mike would you mind showing us how you did this. It would help alot!

Thanks in advanced

@export-mike Also facing the same issue. The test used to work fine, but now they just hang on the SplashScreen and timeout without anything working at all.
Any tips on how you fixed it (if you did) would be great.

Ta.

@mbrehme @Abramovick

I'm using this block to initialize SplashScreen to fix the issue:

bool isDetox = [[[NSProcessInfo processInfo] arguments] containsObject: @"-detoxServer"];
if (!isDetox) {
  [RNSplashScreen show];
}

@halilb Thank you ! It works for me.

yeah I was doing something similar but with a combination of react-native-config

@Abramovick @mbrehme

yeah I was doing something similar but with a combination of react-native-config

Was this page helpful?
0 / 5 - 0 ratings