kanzitelli / rnn-starter

🤹 React Native Starter - Powered by cli-rn, React Native Navigation, Expo Modules, RNN Screens, RN UI lib, MMKV, Mobx, Reanimated 2, Dark Mode, Splash Screen, Localization, Notifications, Permissions, and much more.
https://starters.dev
MIT License
549 stars 72 forks source link

Added Splash Screen #105

Closed FawadMahmood closed 1 year ago

FawadMahmood commented 1 year ago

to configure splash screen update splashscreen.psd

run following commands: yarn patch-splash-android (it will give you a prompt but don't overwrite styles) yarn patch-splash-ios (use project name "RNNStarter" and let it override everything)

PS: Do update the readme file accordingly.

FOR Android:- Generate Android assets using RN-Toolbox

Run the following command:

$ yo rn-toolbox:assets --splash splashscreen.psd --android You will ask these questions:

Project name: Type your project name or just enter if the suggest one is correct. Overwrite styles.xml: Type “n” (no) then enter. Overwrite colors.xml : Type “y” (yes) then enter (only ask if colors.xml already exists) The script will add/modify the following:

Add drawable assets with launch_screen.png name Add a drawable name launch_screen_bitmap.xml . We will use this file as the background image of the Splash Screen layout Add a splashBackground item in colors.xml the color code will be the primary input color Note: You have to discard any changes of styles.xml file if you accident overwrite it when running the script.

FOR IOS:- Generate Android assets using RN-Toolbox (Optional)

Run the following command:

$ yo rn-toolbox:assets --splash splashscreen.psd --ios You will ask these questions:

Project name: Type your project name or just enter if the suggest one is correct Overwrite project.pbxproj: Type “y” (yes) then press enter Overwrite Info.plist: Type “y” (yes) then press enter This will add/modify the following:

Create a new LaunchImage.launchimage file that contains parsed assets Remove UILaunchStoryboardName key and its value from Info.plist Add ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME config for both Debug and Release build settings This will do all the works. You don’t have to do anything else.

kanzitelli commented 1 year ago

hey @FawadMahmood! Thank you so much, that looks great! I will check and run it during this week (a bit busy these days) and prepare instruction section (based on provided steps by you) if needed.

FawadMahmood commented 1 year ago

Looking forward to it brother, Thank you for keeping this repo updated for us, have a good day. 👍

Yasir5247 commented 1 year ago

@kanzitelli when is this possible?

kanzitelli commented 1 year ago

I am very busy these days for Open Source. Will try to review it by the end of the week.

kanzitelli commented 1 year ago

I started reviewing this PR and preparing documentation section for splash screen. Should be released soon.