react-native-splashscreen-dockicon
v1.0.0
Published
A React Native splashscreen and dock icon generator (Android and iOS)
Downloads
1
Maintainers
Readme
React Native Splashscreen Dockicon
Dependencies
Image Magick is required to generate images.
And run npm install
to install node dependencies.
Files dimensions
Source files must have at least the following dimensions:
- Splash screen: 2048x2048px
- Dock icon: 180x180px
CLI
You must provide splash screen and dock icon args to the following command:
node node_modules/react-native-splashscreen-dockicon -- --splash-screen <your_splash_screen_path> --dock-icon <your_dock_icon_path>
Or you can add this directly to your package.json scripts section and run npm run generate:assets
:
scripts: {
...
"generate:assets": "node node_modules/react-native-splashscreen-dockicon -- --splash-screen <your_splash_screen_path> --dock-icon <your_dock_icon_path>",
}
Troubleshooting
iOS: rnpm-install ERR! Something went wrong while linking. Error: Expected "/*", "//", or "{" but "<" found.
When running app on iOS for the first time after generating assets, you should make your ios/<project>.xcodeproj/project.pbxproj
file able to be used by react-native link
command. In other words, it should be converted by Xcode to the new Plist format (not XML).
To make this, follow these steps:
- Open your project on Xcode
- Go to the project settings
- Change an option (for example: from YES to NO, and restore it to the previous value: YES)
- Your
ios/<project>.xcodeproj/project.pbxproj
file should be converted - Launch
react-native link
again
Contributions
Edit files under the src
folder and transpile them using Babel:
npm run babelify
Use the command above.
Tests
npm run test