RNSplashScreen.h not found
See original GitHub issueinfo
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 }
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:10
Top GitHub Comments
try
cd ios && pod install
You need to add the following one to the
Podfile
. The linking isn’t properly working for me right now: