question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RNSplashScreen.h not found

See original GitHub issue

info React Native Environment Info: System: OS: macOS High Sierra 10.13.6 CPU: (4) x64 Intel® Core™ i5-4278U CPU @ 2.60GHz Memory: 306.51 MB / 8.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 10.16.0 - /usr/local/bin/node npm: 6.9.0 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3 Android SDK: API Levels: 21, 22, 23, 24, 25, 26, 27, 28, 29 Build Tools: 29.0.1 IDEs: Android Studio: 3.4 AI-183.6156.11.34.5692245 Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild npmPackages: react: 16.8.3 => 16.8.3 react-native: ^0.59.2 => 0.59.10 npmGlobalPackages: create-react-native-app: 2.0.2 react-native-cli: 2.0.1What react-native-splash-screen version are you using?

IOS platform arise the issue

I gone through every solution info that shared here with respect of these issue but still I get the error. I follow auto linking and Manual linking process of react-native-splash-screen plugin but not get solution.

I do the following process:


In XCode, in the project navigator, right click Libraries ➜ Add Files to [your project’s name]

Go to node_modules ➜ react-native-splash-screen and add SplashScreen.xcodeproj

In XCode, in the project navigator, select your project. Add libSplashScreen.a to your project’s Build Phases ➜ Link Binary With Libraries

To fix ‘RNSplashScreen.h’ file not found, you have to select your project → Build Settings → Search Paths → Header Search Paths to add:

$(SRCROOT)/…/node_modules/react-native-splash-screen/iosJoin a screenshot or video of the problem on the simulator or device?

Update AppDelegate.m file with #import “RNSplashScreen.h”/[RNSplashScreen show]; before return Yes;

In plugin ios directory RNSplashScreen.m file already has: #import “RNSplashScreen.h” #import <React/RCTBridge.h>

My AppDelegate.m file as follows:


/**

  • Copyright © Facebook, Inc. and its affiliates.
  • This source code is licensed under the MIT license found in the
  • LICENSE file in the root directory of this source tree. */

#import “AppDelegate.h”

#import <React/RCTBridge.h> #import <React/RCTBundleURLProvider.h> #import <React/RCTRootView.h> #import “RNSplashScreen.h”

@implementation AppDelegate

  • (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@“newfok” initialProperties:nil];

    rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];

    self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; UIViewController *rootViewController = [UIViewController new]; rootViewController.view = rootView; self.window.rootViewController = rootViewController; [self.window makeKeyAndVisible];

    [RNSplashScreen show];

    return YES; }

  • (NSURL *)sourceURLForBridge:(RCTBridge *)bridge { #if DEBUG return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@“index” fallbackResource:nil]; #else return [[NSBundle mainBundle] URLForResource:@“main” withExtension:@“jsbundle”]; #endif }

@end

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:6
  • Comments:10

github_iconTop GitHub Comments

9reactions
jmahatpure01commented, Feb 2, 2020

try cd ios && pod install

7reactions
iduuckcommented, Mar 6, 2020

You need to add the following one to the Podfile. The linking isn’t properly working for me right now:

pod 'react-native-splash-screen', :path => '../node_modules/react-native-splash-screen'
Read more comments on GitHub >

github_iconTop Results From Across the Web

React native SplashScreen.h file not found - Stack Overflow
//To fix 'RNSplashScreen.h' file not found, you have to select your project → //Build Settings → Search Paths → Header Search Paths to ......
Read more >
[Solved]-React native SplashScreen.h file not found-React ...
Coding example for the question React native SplashScreen.h file not found-React Native.
Read more >
@mattlisiv/reactnative-splashscreen - npm
To fix 'RNSplashScreen.h' file not found , you have to select your project → Build Settings → Search Paths → Header Search Paths...
Read more >
React-native-lottie-splash-screen - npm.io
Check React-native-lottie-splash-screen 1.0.1 package - Last release 1.0.1 ... To fix 'RNSplashScreen.h' file not found , you have to select your project ...
Read more >
Building a splash screen in React Native - LogRocket Blog
Learn how to build a splash screen in React Native for both iOS and Android apps, and edit its features, like background color....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found