Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with changing iOS splash screen from default #25

Open
danilvalov opened this issue Feb 11, 2017 · 2 comments
Open

Problem with changing iOS splash screen from default #25

danilvalov opened this issue Feb 11, 2017 · 2 comments

Comments

@danilvalov
Copy link

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.
@alinz
Copy link

alinz commented Feb 18, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants