React-native-splash-screen: Problem with changing iOS splash screen from default

Created on 11 Feb 2017  ·  2Comments  ·  Source: crazycodeboy/react-native-splash-screen

If I install the current library to my react native app then I see the basic react-native splash screen on iOS (from file ./ios/ProjectName/Base.lproj/LaunchScreen.xib). And if I want to change it to my picture I need to do the following changes:

  1. Add to file ./ios/ProjectName.xcodeproj/project.pbxproj the following strings:
...
    buildSettings = {
        ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
        ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;    /* here */
        CURRENT_PROJECT_VERSION = 1;
        DEAD_CODE_STRIPPING = NO;
        HEADER_SEARCH_PATHS = "$(SRCROOT)/../node_modules/react-native-splash-screen/ios";   /* and here */
...
    buildSettings = {
        ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
        ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;    /* here */
        CURRENT_PROJECT_VERSION = 1;
        DEAD_CODE_STRIPPING = NO;
        HEADER_SEARCH_PATHS = "$(SRCROOT)/../node_modules/react-native-splash-screen/ios";   /* and here */
...
  1. Remove from file ./ios/ProjectName.xcodeproj/project.pbxproj the following strings:
...
    <key>UILaunchStoryboardName</key>
    <string>LaunchScreen</string>
...

If I do it then I see my splash screen from the directory ./ios/ProjectName/Images.xcassets/LaunchImage.launchimage like in example.

Please, add it to README.md or fix it.

P.S. Your example doesn't work for me. I see the following error when app starts:

Application examples has not been registered. This is either due to a require() error during initialization or failure to call AppRegistry.registerComponent.

All 2 comments

@danilvalov this is great, do a PR and help others.

Was this page helpful?
0 / 5 - 0 ratings