yarn react-native-bootsplash 4.7.0

latest releases: 6.3.1, 6.3.0, 6.2.6...
18 months ago

New architecture support 🎉

Note that the iOS setup has been updated for react-native >= 0.71.
The old way still works, but this is the preferred one now:

#import "AppDelegate.h"
#import "RNBootSplash.h"

#import <React/RCTBundleURLProvider.h>

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  self.moduleName = @"YourAppName";
  // You can add your custom initial props in the dictionary below.
  // They will be passed down to the ViewController used by React Native.
  self.initialProps = @{};

  // ❗️ Remove the initWithStoryboard call here and restore the original returned value

  return [super application:application didFinishLaunchingWithOptions:launchOptions];
}

//

// ⬇️ Add this before file @end
- (UIView *)createRootViewWithBridge:(RCTBridge *)bridge
                          moduleName:(NSString *)moduleName
                           initProps:(NSDictionary *)initProps {
  UIView *rootView = [super createRootViewWithBridge:bridge
                                          moduleName:moduleName
                                           initProps:initProps];

  [RNBootSplash initWithStoryboard:@"BootSplash" rootView:rootView]; // ⬅️ initialize the splash screen

  return rootView;
}

@end

Don't miss a new react-native-bootsplash release

NewReleases is sending notifications on new releases.