!> Make sure you are using react-native version >= 0.51. We also recommend using npm version >= 3
-
Install
react-native-navigation
latest stable version.yarn add react-native-navigation@1.x.x
-
In Xcode, in Project Navigator (left pane), right-click on the
Libraries
>Add files to [project name]
. Add./node_modules/react-native-navigation/ios/ReactNativeNavigation.xcodeproj
(screenshots) -
In Xcode, in Project Navigator (left pane), click on your project (top), then click on your target row (on the "project and targets list", which is on the left column of the right pane) and select the
Build Phases
tab (right pane). In theLink Binary With Libraries
section addlibReactNativeNavigation.a
(screenshots) -
In Xcode, in Project Navigator (left pane), click on your project (top), then click on your project row (on the "project and targets list") and select the
Build Settings
tab (right pane). In theHeader Search Paths
section add$(SRCROOT)/../node_modules/react-native-navigation/ios
. Make sure on the right to mark this new pathrecursive
(screenshots) -
In Xcode, you will need to edit this file:
AppDelegate.m
.Replace all of its code with this reference
Replace
@"index.ios"
with@"index"
if you are usingindex.js
as your entry point instead ofindex.ios.js
andindex.android.js
(it is the default since React Native 0.49).