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

Added Splash Screen #105

Merged
merged 8 commits into from
Oct 19, 2022
Merged

Conversation

FawadMahmood
Copy link
Contributor

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.

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)
@kanzitelli
Copy link
Owner

kanzitelli commented Oct 3, 2022

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.

@kanzitelli kanzitelli self-assigned this Oct 3, 2022
@FawadMahmood
Copy link
Contributor Author

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

@Yasir5247
Copy link

@kanzitelli when is this possible?

@kanzitelli
Copy link
Owner

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

@kanzitelli
Copy link
Owner

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

@kanzitelli kanzitelli merged commit b1bfceb into kanzitelli:splash-screen Oct 19, 2022
This pull request was closed.
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

Successfully merging this pull request may close these issues.

3 participants