Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'ReactNativeNavigation/ReactNativeNavigation.h' file not found

Note: Please make sure to comment as to what I should mention to improve this question instead of thumbing down, I was able to successfully set up React Navigation with expo for another project, and would love to get RNN up and running in this project.


I'm working on setting up React Native Navigation for my React Native app, specifically iOS using Xcode.

I've changed the AppDelegate.m file as instructed:

#import "AppDelegate.h"

#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import <ReactNativeNavigation/ReactNativeNavigation.h>

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  NSURL *jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
  [ReactNativeNavigation bootstrap:jsCodeLocation launchOptions:launchOptions];

  return YES;
}

@end

Upon making my changes, I am receiving two Xcode errors:

'ReactNativeNavigation/ReactNativeNavigation.h' file not found
Use of undeclared identifier 'ReactNativeNavigation'

I have made sure to follow all the steps, the error is happening in the step 3 of the React Native Navigation iOS documentation

like image 498
Joseph K. Avatar asked Nov 06 '22 22:11

Joseph K.


1 Answers

Try removing node_modules folder, then doing a fresh npm install or yarn install in your project directory. Following that run react-native link.

like image 122
mediaguru Avatar answered Nov 15 '22 06:11

mediaguru