Following the steps in the link doesn't help in integrating react native in existing project.
Link: https://reactnative.dev/docs/integration-with-existing-apps
Configuration
Mac OS X - 10.15.6 (19G2021)
XCode - 12.1 (12A7403)
React Native Cli - 2.0.1
React Native - 0.63.4
package.json
{
"name": "MyReactNativeApp",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "yarn react-native start"
}
"dependencies": {
"react-native": "^0.63.4"
}
}
Podfile
source 'https://github.com/CocoaPods/Specs.git'
# Required for Swift apps
platform :ios, '11.0'
use_frameworks!
# The target name is most likely the name of your project.
target 'MyReactNativeApp' do
# Your 'node_modules' directory is probably in the root of your project,
# but if not, adjust the `:path` accordingly
pod 'React', :path => '../MyReactNativeApp/node_modules/react-native', :subspecs => [
'Core',
'CxxBridge', # Include this for RN >= 0.47
'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
'RCTText',
'RCTNetwork',
'RCTWebSocket', # needed for debugging
# Add any other subspecs you want to use in your project
]
# Explicitly include Yoga if you are using RN >= 0.42.0
pod "Yoga", :path => "../MyReactNativeApp/node_modules/react-native/ReactCommon/yoga"
# Third party deps podspec link
pod 'DoubleConversion', :podspec => '../MyReactNativeApp/node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../MyReactNativeApp/node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../MyReactNativeApp/node_modules/react-native/third-party-podspecs/Folly.podspec'
end
When I run pod install. I get an error
[!] CocoaPods could not find compatible versions for pod "React/Core":
Screenshot:
I checked existing threads. Nothing works fine. I also did pod 'React' by removing everything else, result is
- It's deprecated
- It's not detected as Module. Module not found - I will separate Question for that.
