I get this message
RNN Pod has not been added to Podfile
if I try to add the pod manually, I run into this.
[!] There are multiple dependencies with different sources for `ReactNativeNavigation` in `Podfile`:
- ReactNativeNavigation (from `../node_modules/react-native-navigation`)
Step 1 - running this command.
npx rnn-link
Step 2 - this is the output
Running Android postlink script.
Linking MainApplication...
Extending NavigationApplication
Changing host implementation to NavigationReactNativeHost
Removing call to SOLoader.init()
MainApplication.java linked successfully!
Linking MainActivity...
Extending NavigationActivity
Removing getMainComponentName function
MainActivity linked successfully!
Linking root build.gradle...
Adding RNNKotlinVersion to extension block
Adding Kotlin plugin
Updating minSdkVersion to 19
Root build.gradle linked successfully!
Running iOS postlink script.
Linking AppDelegate...
Removing Unneeded imports
All imports have been removed
Importing ReactNativeNavigation.h
Bootstrapping Navigation
Removing Application launch content
Application Launch content has been removed
AppDelegate linked successfully!
Updating Podfile...
RNN Pod has not been added to Podfile
React Native Navigation link is completed. Check the logs above for more information.
If any of the steps failed, check the installation docs and go through the necessary steps manually:
https://wix.github.io/react-native-navigation/docs/installing#manual-installation
When you're done, don't forget to update the index.js file as mentioned in docs!
Thank you for using React Native Navigation!
+1 got the same message
cd ios & pod install solves that
https://github.com/wix/react-native-navigation/blob/master/autolink/postlink/podfileLinker.js
here is the implementation
looks like the link function try to remove the podlink to the library unsuccessfully (makes sense as I dont think this is needed in latest RN)
@jbesraa
Thank you for the response. In my case, a direct usage of
cd iOS & pod install
did not solve the problem. I had to manually add the navigation library in the iOS project. my pod file ended up looking like this.
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '10.0'
target 'baribasicreact' do
pod 'ReactNativeNavigation' , :podspec => '../node_modules/react-native-navigation'
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
target 'baribasicreactTests' do
inherit! :complete
# Pods for testing
end
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
use_flipper!
post_install do |installer|
flipper_post_install(installer)
end
end
target 'baribasicreact-tvOS' do
# Pods for baribasicreact-tvOS
target 'baribasicreact-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
and only then,
cd iOS & pod install
worked. I am putting the details here in case other newcomers like me run into the same issue. Ideally, it would be cool if (as you have explained, and I dont know, because, I am new to react), the link function stops the removal of pod link.