watchman watch-del-all rimraf -r $TMPDIR/react-* rimraf -r node_modules/ rimraf -r build/ios npm cache verify yarn cache clean pc restart yarn install yarn start --reset-cache
rm -rf ios/build/; kill $(lsof -t -i:8081);react-native run-ios
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Make it look like the icon the user taps grows to fill the entire screen making for a seamless transition. | |
2. Keep it simple. A splash screen should only show for a few milliseconds. It shouldn’t have a lot of information on it — it is, after all, a dreaded loading screen. | |
3. With all of this in mind we’ll start with a a square image at three sizes (@1x = 200px, @2x = 400px, @3x = 600px). | |
Preparing the App | |
If you’ve tried to set up a splash screen in React Native then you may have experience a white screen flash before your content loads. If your app has a white background this is often not very noticable, but it’s still a pain. Today we’re going to make it very noticable if we have any flashes of white. To do that we’ll set a dark background color in our app. | |
Replace App.js with | |
import React, { Component } from 'react'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This post outlines how to get custom fonts working reliably in React Native. | |
Most crucially, our font files have to be named correctly. I recommend using the following format for file names: | |
OpenSans.ttf - Regular weight | |
OpenSans-Italic.ttf - Regular weight, Italic style | |
OpenSans-Light.ttf - Light weight | |
OpenSans-LightItalic.ttf - Light weight, Italic style | |
OpenSans-SemiBold.ttf - Semi-bold weight | |
OpenSans-SemiBoldItalic.ttf - Semi-bold weight, Italic style |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
goto cmd and write command: | |
========================== | |
keytool -list -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Unexpected Output | |
================= | |
C:\Users\Rida\Documents\start>react-native init sample | |
This will walk you through creating a new React Native project in C:\Users\Rida\Documents\start\sample | |
Using yarn v1.2.1 | |
Installing react-native... | |
yarn add v1.2.1 | |
warning ..\..\..\package.json: No license field | |
info No lockfile found. | |
[1/4] Resolving packages... |