Gathering detailed insights and metrics for checkinme-react-native-bootsplash-custom
Gathering detailed insights and metrics for checkinme-react-native-bootsplash-custom
Gathering detailed insights and metrics for checkinme-react-native-bootsplash-custom
Gathering detailed insights and metrics for checkinme-react-native-bootsplash-custom
🚀 Show a splash screen during app startup. Hide it when you are ready.
npm install checkinme-react-native-bootsplash-custom
Typescript
Module System
Node Version
NPM Version
TypeScript (57.64%)
Kotlin (15.47%)
JavaScript (10.64%)
HTML (6.51%)
Objective-C++ (5.71%)
Ruby (2.26%)
Swift (1.41%)
Objective-C (0.36%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
3,961 Stars
669 Commits
274 Forks
18 Watchers
1 Branches
51 Contributors
Updated on Jul 12, 2025
Latest Version
3.2.4-10
Package Id
checkinme-react-native-bootsplash-custom@3.2.4-10
Unpacked Size
134.35 kB
Size
28.98 kB
File Count
31
NPM Version
8.19.4
Node Version
16.20.0
Published on
Feb 12, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
Show a bootsplash during app startup. Hide it when you are ready.
version | react-native version |
---|---|
3.0.0+ | 0.63.0+ |
2.0.0+ | 0.60.0+ |
For 0.59-, you should use jetify -r
1$ npm install --save react-native-bootsplash 2# --- or --- 3$ yarn add react-native-bootsplash
Don't forget going into the ios
directory to execute a pod install
.
Because this package targets React Native 0.60.0+, you will probably don't need to link it manually. Otherwise if it's not the case, follow this additional instructions:
Add this line to your ios/Podfile
file, then run pod install
.
1target 'YourAwesomeProject' do 2 # … 3 pod 'RNBootSplash', :path => '../node_modules/react-native-bootsplash' 4end
android/settings.gradle
:1include ':react-native-bootsplash' 2project(':react-native-bootsplash').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-bootsplash/android')
android/app/build.gradle
:1dependencies { 2 // ... 3 implementation project(':react-native-bootsplash') 4}
MainApplication.java
:1import com.zoontek.rnbootsplash.RNBootSplashPackage; // <- add the RNBootSplashPackage import 2 3public class MainApplication extends Application implements ReactApplication { 4 5 // … 6 7 @Override 8 protected List<ReactPackage> getPackages() { 9 @SuppressWarnings("UnnecessaryLocalVariable") 10 List<ReactPackage> packages = new PackageList(this).getPackages(); 11 // … 12 packages.add(new RNBootSplashPackage()); 13 return packages; 14 } 15 16 // … 17}
In order to speed up the setup, we provide a CLI to generate assets, create the Android Drawable XML file and the iOS Storyboard file automatically ✨.
1$ npx react-native generate-bootsplash --help 2# --- or --- 3$ yarn react-native generate-bootsplash --help
The command can take multiple arguments:
1react-native generate-bootsplash <logoPath> 2 3Generate a launch screen using an original logo file 4 5Options: 6 --background-color <color> color used as launch screen background (in hexadecimal format) (default: "#fff") 7 --logo-width <width> logo width at @1x (in dp - we recommand approximately ~100) (default: 100) 8 --assets-path [path] path to your static assets directory (useful to require the logo file in JS) 9 --flavor <flavor> [android only] flavor build variant (outputs in an android resource directory other than "main") 10 -h, --help output usage information
1yarn react-native generate-bootsplash assets/bootsplash_logo_original.png \ 2 --background-color=F5FCFF \ 3 --logo-width=100 \ 4 --assets-path=assets \ 5 --flavor=main
This tool relies on the naming conventions that are used in the /example
project and will therefore create the following files:
1android/app/src/main/res/drawable/bootsplash.xml 2android/app/src/main/res/values/colors.xml (creation and edition) 3android/app/src/main/res/mipmap-hdpi/bootsplash_logo.png 4android/app/src/main/res/mipmap-mdpi/bootsplash_logo.png 5android/app/src/main/res/mipmap-xhdpi/bootsplash_logo.png 6android/app/src/main/res/mipmap-xxhdpi/bootsplash_logo.png 7android/app/src/main/res/mipmap-xxxhdpi/bootsplash_logo.png 8 9ios/YourProjectName/BootSplash.storyboard 10ios/YourProjectName/Images.xcassets/BootSplashLogo.imageset/bootsplash_logo.png 11ios/YourProjectName/Images.xcassets/BootSplashLogo.imageset/bootsplash_logo@2x.png 12ios/YourProjectName/Images.xcassets/BootSplashLogo.imageset/bootsplash_logo@3x.png 13 14# Only if --assets-path was specified 15assets/bootsplash_logo.png 16assets/bootsplash_logo@1,5x.png 17assets/bootsplash_logo@2x.png 18assets/bootsplash_logo@3x.png 19assets/bootsplash_logo@4x.png
⚠️ Only .storyboard
files are supported (Apple has deprecated other methods in April 2020).
Edit the ios/YourProjectName/AppDelegate.m
file:
1#import "AppDelegate.h" 2 3#import <React/RCTBridge.h> 4#import <React/RCTBundleURLProvider.h> 5#import <React/RCTRootView.h> 6 7#import "RNBootSplash.h" // <- add the header import 8 9@implementation AppDelegate 10 11- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 12{ 13 // … 14 rootViewController.view = rootView; 15 self.window.rootViewController = rootViewController; 16 [self.window makeKeyAndVisible]; 17 18 [RNBootSplash initWithStoryboard:@"BootSplash" rootView:rootView]; // <- initialization using the storyboard file name 19 20 return YES; 21}
Set the BootSplash.storyboard
as launch screen file:
Drag and drop the file | Create folder reference | Set as Launch Screen File |
---|---|---|
![]() | ![]() | ![]() |
android/app/src/main/java/com/yourprojectname/MainActivity.java
file:1import android.os.Bundle; // <- add this necessary import 2 3import com.facebook.react.ReactActivity; 4import com.zoontek.rnbootsplash.RNBootSplash; // <- add this necessary import 5 6public class MainActivity extends ReactActivity { 7 8 // … 9 10 @Override 11 protected void onCreate(Bundle savedInstanceState) { 12 super.onCreate(savedInstanceState); 13 RNBootSplash.init(R.drawable.bootsplash, MainActivity.this); // <- display the generated bootsplash.xml drawable over our MainActivity 14 }
As Android will not create our main activity before launching the app, we need to display a different activity at start, then switch to our main one.
android/app/src/main/res/values/styles.xml
file:1<resources> 2 3 <!-- Base application theme --> 4 <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> 5 <!-- Your base theme customization --> 6 </style> 7 8 <!-- Add the following lines (BootTheme should inherit from AppTheme) --> 9 <style name="BootTheme" parent="AppTheme"> 10 <!-- set the generated bootsplash.xml drawable as activity background --> 11 <item name="android:background">@drawable/bootsplash</item> 12 </style> 13 14</resources>
android/app/src/main/AndroidManifest.xml
file:1<manifest xmlns:android="http://schemas.android.com/apk/res/android" 2 package="com.rnbootsplashexample"> 3 4 <!-- … --> 5 6 <application 7 android:name=".MainApplication" 8 android:label="@string/app_name" 9 android:icon="@mipmap/ic_launcher" 10 android:roundIcon="@mipmap/ic_launcher_round" 11 android:allowBackup="false" 12 android:theme="@style/AppTheme"> 13 14 <activity 15 android:name=".MainActivity" 16 android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode" 17 android:label="@string/app_name" 18 android:windowSoftInputMode="adjustResize" 19 android:exported="true" 20 android:launchMode="singleTask"> 21 <!-- ⚠️ add android:exported="true" and android:launchMode="singleTask" above --> 22 <!-- remove the <intent-filter> from .MainActivity --> 23 </activity> 24 25 <!-- add the following lines (use the theme you created at step 2) --> 26 <activity 27 android:name="com.zoontek.rnbootsplash.RNBootSplashActivity" 28 android:theme="@style/BootTheme" 29 android:launchMode="singleTask"> 30 <intent-filter> 31 <action android:name="android.intent.action.MAIN" /> 32 <category android:name="android.intent.category.LAUNCHER" /> 33 </intent-filter> 34 </activity> 35 36 <!-- … --> 37 38 </application> 39 40</manifest>
1type hide = (config?: { fade?: boolean }) => Promise<void>;
1import RNBootSplash from "react-native-bootsplash";
2
3RNBootSplash.hide(); // immediate
4RNBootSplash.hide({ fade: true }); // fade
1type show = (config?: { fade?: boolean }) => Promise<void>;
1import RNBootSplash from "react-native-bootsplash";
2
3RNBootSplash.show(); // immediate
4RNBootSplash.show({ fade: true }); // fade
1type VisibilityStatus = "visible" | "hidden" | "transitioning"; 2type getVisibilityStatus = () => Promise<VisibilityStatus>;
1import RNBootSplash from "react-native-bootsplash"; 2 3RNBootSplash.getVisibilityStatus().then((status) => console.log(status));
1import React, { useEffect } from "react"; 2import { Text } from "react-native"; 3import RNBootSplash from "react-native-bootsplash"; 4 5function App() { 6 useEffect(() => { 7 const init = async () => { 8 // …do multiple sync or async tasks 9 }; 10 11 init().finally(async () => { 12 await RNBootSplash.hide({ fade: true }); 13 console.log("Bootsplash has been hidden successfully"); 14 }); 15 }, []); 16 17 return <Text>My awesome app</Text>; 18}
🤙 A more complex example is available in the /example
folder.
If you want to correctly handle deep linking with this package, you should edit the android/app/src/main/AndroidManifest.xml
file like this:
1<manifest xmlns:android="http://schemas.android.com/apk/res/android" 2 package="com.rnbootsplashexample"> 3 4 <!-- … --> 5 6 <application 7 android:name=".MainApplication" 8 android:label="@string/app_name" 9 android:icon="@mipmap/ic_launcher" 10 android:roundIcon="@mipmap/ic_launcher_round" 11 android:allowBackup="false" 12 android:theme="@style/AppTheme"> 13 14 <activity 15 android:name=".MainActivity" 16 android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode" 17 android:label="@string/app_name" 18 android:windowSoftInputMode="adjustResize" 19 android:exported="true" 20 android:launchMode="singleTask"> 21 <!-- ⚠️ add android:exported="true" and android:launchMode="singleTask" above --> 22 <!-- remove the <intent-filter> from .MainActivity --> 23 </activity> 24 25 <activity 26 android:name="com.zoontek.rnbootsplash.RNBootSplashActivity" 27 android:theme="@style/BootTheme" 28 android:launchMode="singleTask"> 29 <intent-filter> 30 <action android:name="android.intent.action.MAIN" /> 31 <category android:name="android.intent.category.LAUNCHER" /> 32 </intent-filter> 33 34 <!-- add your deep linking instructions inside the RNBootSplashActivity declaration --> 35 <intent-filter> 36 <action android:name="android.intent.action.VIEW" /> 37 <category android:name="android.intent.category.DEFAULT" /> 38 <category android:name="android.intent.category.BROWSABLE" /> 39 <data android:scheme="YOUR APP SCHEME" /> <!-- replace this with your custom scheme --> 40 </intent-filter> 41 </activity> 42 43 <!-- … --> 44 45 </application> 46 47</manifest>
Testing code which uses this library required some setup since we need to mock the native methods.
To add the mocks, create a file jest/setup.js (or any other file name) containing the following code:
1jest.mock("react-native-bootsplash", () => { 2 return { 3 hide: jest.fn().mockResolvedValueOnce(), 4 show: jest.fn().mockResolvedValueOnce(), 5 getVisibilityStatus: jest.fn().mockResolvedValue("hidden"), 6 }; 7});
After that, we need to add the setup file in the jest config. You can add it under setupFiles option in your jest config file:
1{ 2 "setupFiles": ["<rootDir>/jest/setup.js"] 3}
If you are using React Navigation, you can hide the splash screen once the navigation container and all children have finished mounting by using the onReady
function.
1import React from "react"; 2import { NavigationContainer } from "@react-navigation/native"; 3import RNBootSplash from "react-native-bootsplash"; 4 5function App() { 6 return ( 7 <NavigationContainer onReady={() => RNBootSplash.hide()}> 8 {/* content */} 9 </NavigationContainer> 10 ); 11}
If react-native-splash-screen
encourages you to display an image over your application, react-native-bootsplash
way-to-go is to design your launch screen using platforms tools (Xcode layout editor and Android drawable resource).
It should not prevent you from seeing red screen errors.
Hiding the launch screen is configurable: fade it out or hide it without any animation at all (no fade needed if you want to animate it out!).
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
12 commit(s) and 19 issue activity found in the last 90 days -- score normalized to 10
Reason
license file detected
Details
Reason
binaries present in source code
Details
Reason
1 existing vulnerabilities detected
Details
Reason
Found 6/28 approved changesets -- score normalized to 2
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More