Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to resolve React Native iOS linking error:: 'ReactNativeNavigation/ReactNativeNavigation.h' file not found?

I have integrated React Native Navigation package for my React Native application.I need to update my old React Native Navigation version to latest version. I am following it's official docs for setup:: check this link https://wix.github.io/react-native-navigation/#/docs/Installing?id=ios

I am facing an issue in iOS linking.

Error:: 'ReactNativeNavigation/ReactNativeNavigation.h' file not found

Error:: Semantic issue: Use of undeclared identifier ReactNativeNavigation

I have also followed this previous post but it's not works for me link I'm setting up React Native Navigation for my application, for iOS using Xcode.

I've made modifications in the AppDelegate.m file as followed by it's official link:

#import "AppDelegate.h"

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

@implementation AppDelegate

- (BOOL)application:(UIΩApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  NSURL *jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
  [ReactNativeNavigation bootstrap:jsCodeLocation launchOptions:launchOptions];
  
  return YES;
}

@end

Please suggest how to resolve this issue for iOS platform.

like image 849
Archana Sharma Avatar asked Mar 21 '26 03:03

Archana Sharma


1 Answers

I'm still having other build issues but adding the line

pod 'ReactNativeNavigation', :podspec => '../node_modules/react-native-navigation/ReactNativeNavigation.podspec'

to the Podfile in my ios directory resolved the XCode error for me. Once this line is added you have to run

pod install from within the ios directory

The react-native-navigation documentation says that new versions of react-native will use pods. You can this see it under the Installation with CocoaPods section

https://wix.github.io/react-native-navigation/#/docs/Installing

like image 173
Michael Fox Avatar answered Mar 22 '26 18:03

Michael Fox



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!