Installed with yarn install react-native-unimodules
The next step in the instructions required me to edit my project Podfile. The necessary additions were shown here.
Here is my resultant Podfile
platform :ios, '10.0'
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
require_relative '../node_modules/react-native-unimodules/cocoapods.rb'
target 'MyProjectName' do
# Pods for MyProjectName
pod 'React', :path => '../node_modules/react-native/', :subspecs => [
'Core',
'CxxBridge',
'DevSupport',
'RCTText',
'RCTNetwork',
'RCTWebSocket',
'RCTAnimation',
'RCTImage',
]
pod 'React-Core', :path => '../node_modules/react-native/React'
pod 'React-DevSupport', :path => '../node_modules/react-native/React'
pod 'React-fishhook', :path => '../node_modules/react-native/Libraries/fishhook'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
use_unimodules!
target 'MyProjectNameTests' do
inherit! :search_paths
# Pods for testing
end
use_native_modules!
end
target 'MyProjectName-tvOS' do
# Pods for MyProjectName-tvOS
target 'MyProjectName-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
The next step is running pod install, which gives the following output/error:
$ pod install
Installing unimodules:
expo-app-loader-provider#5.0.1 from ../node_modules/expo-app-loader-provider/ios
expo-constants#5.0.1 from ../node_modules/expo-constants/ios
expo-file-system#5.0.1 from ../node_modules/expo-file-system/ios
expo-permissions#5.0.1 from ../node_modules/expo-permissions/ios
unimodules-barcode-scanner-interface#2.0.1 from ../node_modules/unimodules-barcode-scanner-interface/ios
unimodules-camera-interface#2.0.1 from ../node_modules/unimodules-camera-interface/ios
unimodules-constants-interface#2.0.1 from ../node_modules/unimodules-constants-interface/ios
unimodules-core#2.0.1 from ../node_modules/#unimodules/core/ios
unimodules-face-detector-interface#2.0.1 from ../node_modules/unimodules-face-detector-interface/ios
unimodules-file-system-interface#2.0.1 from ../node_modules/unimodules-file-system-interface/ios
unimodules-font-interface#2.0.1 from ../node_modules/unimodules-font-interface/ios
unimodules-image-loader-interface#2.0.1 from ../node_modules/unimodules-image-loader-interface/ios
unimodules-permissions-interface#2.0.1 from ../node_modules/unimodules-permissions-interface/ios
unimodules-react-native-adapter#2.0.1 from ../node_modules/#unimodules/react-native-adapter/ios
unimodules-sensors-interface#2.0.1 from ../node_modules/unimodules-sensors-interface/ios
unimodules-task-manager-interface#2.0.1 from ../node_modules/unimodules-task-manager-interface/ios
Analyzing dependencies
Fetching podspec for `EXAppLoaderProvider` from `../node_modules/expo-app-loader-provider/ios`
Fetching podspec for `EXConstants` from `../node_modules/expo-constants/ios`
Fetching podspec for `EXFileSystem` from `../node_modules/expo-file-system/ios`
Fetching podspec for `EXPermissions` from `../node_modules/expo-permissions/ios`
Fetching podspec for `React-Core` from `../node_modules/react-native/React`
Fetching podspec for `React-DevSupport` from `../node_modules/react-native/React`
Fetching podspec for `React-RCTActionSheet` from `../node_modules/react-native/Libraries/ActionSheetIOS`
Fetching podspec for `React-RCTAnimation` from `../node_modules/react-native/Libraries/NativeAnimation`
Fetching podspec for `React-RCTBlob` from `../node_modules/react-native/Libraries/Blob`
Fetching podspec for `React-RCTImage` from `../node_modules/react-native/Libraries/Image`
Fetching podspec for `React-RCTLinking` from `../node_modules/react-native/Libraries/LinkingIOS`
Fetching podspec for `React-RCTNetwork` from `../node_modules/react-native/Libraries/Network`
Fetching podspec for `React-RCTSettings` from `../node_modules/react-native/Libraries/Settings`
Fetching podspec for `React-RCTText` from `../node_modules/react-native/Libraries/Text`
Fetching podspec for `React-RCTVibration` from `../node_modules/react-native/Libraries/Vibration`
Fetching podspec for `React-RCTWebSocket` from `../node_modules/react-native/Libraries/WebSocket`
Fetching podspec for `React-cxxreact` from `../node_modules/react-native/ReactCommon/cxxreact`
Fetching podspec for `React-fishhook` from `../node_modules/react-native/Libraries/fishhook`
Fetching podspec for `React-jsi` from `../node_modules/react-native/ReactCommon/jsi`
Fetching podspec for `React-jsiexecutor` from `../node_modules/react-native/ReactCommon/jsiexecutor`
Fetching podspec for `React-jsinspector` from `../node_modules/react-native/ReactCommon/jsinspector`
Fetching podspec for `React` from `../node_modules/react-native/`
Fetching podspec for `UMBarCodeScannerInterface` from `../node_modules/unimodules-barcode-scanner-interface/ios`
Fetching podspec for `UMCameraInterface` from `../node_modules/unimodules-camera-interface/ios`
Fetching podspec for `UMConstantsInterface` from `../node_modules/unimodules-constants-interface/ios`
Fetching podspec for `UMCore` from `../node_modules/#unimodules/core/ios`
Fetching podspec for `UMFaceDetectorInterface` from `../node_modules/unimodules-face-detector-interface/ios`
Fetching podspec for `UMFileSystemInterface` from `../node_modules/unimodules-file-system-interface/ios`
Fetching podspec for `UMFontInterface` from `../node_modules/unimodules-font-interface/ios`
Fetching podspec for `UMImageLoaderInterface` from `../node_modules/unimodules-image-loader-interface/ios`
Fetching podspec for `UMPermissionsInterface` from `../node_modules/unimodules-permissions-interface/ios`
Fetching podspec for `UMReactNativeAdapter` from `../node_modules/#unimodules/react-native-adapter/ios`
Fetching podspec for `UMSensorsInterface` from `../node_modules/unimodules-sensors-interface/ios`
Fetching podspec for `UMTaskManagerInterface` from `../node_modules/unimodules-task-manager-interface/ios`
Fetching podspec for `yoga` from `../node_modules/react-native/ReactCommon/yoga`
[!] CocoaPods could not find compatible versions for pod "React/Core":
In Podfile:
React/Core (from `../node_modules/react-native/`)
None of your spec sources contain a spec satisfying the dependency: `React/Core (from `../node_modules/react-native/`)`.
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.
Following the responses to a Github issue regarding this exact error output, I did a search of file contents for my entire project directory and did not get a hit for any place React-Core may be badly defined as React/Core.
This is my first time ever editing a Podfile, and I fear I may have fumbled something in the syntax.
React Native changed a lot of things in 0.60, one of them was to split React podspec into separate podspecs.
That means that React podspec no longer has any subspecs. The error you're getting is React/Core, which used to be a subspec, is no longer available (it's now imported separately). To fix the problem, remove the subspecs from your Podfile:
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/React'
etc...
Note that many tutorials and documentation you'll find on the web include the subspecs definitions. That's how things were done in React Native <=0.59, and are no longer valid in 0.60.
I guess podspec names changed: React-Core is not in sub folder it is in root folder. Here is my working pod file with React-Native 0.61.3:
# Uncomment the next line to define a global platform for your project
platform :ios, '10.0'
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
target 'MyApp' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for MyApp
pod 'RNDeviceInfo', :path => '../node_modules/react-native-device-info'
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
pod 'ReactCommon', :path => '../node_modules/react-native/ReactCommon'
pod 'React-Core', :path => '../node_modules/react-native'
pod 'React', :path => '../node_modules/react-native'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
target 'MyAppTests' do
inherit! :search_paths
# Pods for testing
end
end
Related
I am creating an app using React Native and am trying to install cocoa pods for iOS but when I enter pod install into the terminal I get the following warning.
Then when I try to run my app in an iOS emulator it crashes and won't run.
Here is the Xcode error.
I am running react native 0.63.2.
Here is my pod file
# Uncomment the next line to define a global platform for your project
platform :ios, '11.0'
require_relative '../node_modules/react-native/scripts/react_native_pods'
target 'Example' do
# Comment the next line if you don't want to use dynamic frameworks
#use_frameworks!
# Pods for Example
# pod 'React', :path => '../node_modules/react-native'
pod 'RNSound', :path => '../node_modules/react-native-sound'
pod 'RNCAsyncStorage', :path => '../node_modules/#react-native-community/async-storage'
pod 'RNCMaskedView', :path => '../node_modules/#react-native-community/masked-view'
pod 'RNCPushNotificationIOS', :path => '../node_modules/#react-native-community/push-notification-ios'
pod 'react-native-slider', :path => '../node_modules/#react-native-community/slider'
pod 'RNFBApp', :path => '../node_modules/#react-native-firebase/app'
pod 'RNFBAuth', :path => '../node_modules/#react-native-firebase/auth'
pod 'RNFBMessaging', :path => '../node_modules/#react-native-firebase/messaging'
pod 'RNFirebase', :path => '../node_modules/react-native-firebase/ios'
pod 'RNGestureHandler', :path => '../node_modules/react-native-gesture-handler'
pod 'RNReanimated', :path => '../node_modules/react-native-reanimated'
pod 'react-native-safe-area-context', :path => '../node_modules/react-native-safe-area-context'
pod 'RNScreens', :path => '../node_modules/react-native-screens'
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
target 'Example-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
target 'ExampleTests' do
inherit! :search_paths
# Pods for testing
end
end
target 'Example-tvOS' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for Example-tvOS
end
The issue is that you don't install pod for the correctly target.
This is strange if this is a new RN project because it should take the correct target.
In you recently image added seems like you have another target called AntrimElimChurch so if you want to install pod for that target you should change it in PodFile as well
am running react native 0.63.2.
Here is my pod file
# Uncomment the next line to define a global platform for your project
platform :ios, '11.0'
require_relative '../node_modules/react-native/scripts/react_native_pods'
target 'AntrimElimChurch' do
# Comment the next line if you don't want to use dynamic frameworks
#use_frameworks!
# Pods for Example
# pod 'React', :path => '../node_modules/react-native'
pod 'RNSound', :path => '../node_modules/react-native-sound'
pod 'RNCAsyncStorage', :path => '../node_modules/#react-native-community/async-storage'
pod 'RNCMaskedView', :path => '../node_modules/#react-native-community/masked-view'
pod 'RNCPushNotificationIOS', :path => '../node_modules/#react-native-community/push-notification-ios'
pod 'react-native-slider', :path => '../node_modules/#react-native-community/slider'
pod 'RNFBApp', :path => '../node_modules/#react-native-firebase/app'
pod 'RNFBAuth', :path => '../node_modules/#react-native-firebase/auth'
pod 'RNFBMessaging', :path => '../node_modules/#react-native-firebase/messaging'
pod 'RNFirebase', :path => '../node_modules/react-native-firebase/ios'
pod 'RNGestureHandler', :path => '../node_modules/react-native-gesture-handler'
pod 'RNReanimated', :path => '../node_modules/react-native-reanimated'
pod 'react-native-safe-area-context', :path => '../node_modules/react-native-safe-area-context'
pod 'RNScreens', :path => '../node_modules/react-native-screens'
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
target 'Example-tvOSTests' do
inherit! :search_paths
# Pods for testing
pod 'react-native-notifications', :path => '../node_modules/react-native-notifications'
end
target 'ExampleTests' do
inherit! :search_paths
# Pods for testing
end
end
target 'Example-tvOS' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for Example-tvOS
end
After this change run again pod install and it should build
I have recently tried updating my react native from 0.62 to 0.63.
After doing this I went into my iOS folder via cd iOS and ran pod install, when doing this I get the following error message in my terminal.
I have tried running the command pod repo update as the error says but this doesn't fix the problem.
I have tried searching the error online but am unable to find a fix.
Here is my profile file.
platform :ios, '10.0'
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
target 'Example' do
# Pods for Example
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/'
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
# React Native Maps dependencies
rn_maps_path = '../node_modules/react-native-maps'
pod 'react-native-google-maps', :path => rn_maps_path
pod 'GoogleMaps'
pod 'Google-Maps-iOS-Utils'
pod 'RNCPushNotificationIOS', :path => '../node_modules/#react-native-community/push-notification-ios'
pod 'RNSound', :path => '../node_modules/react-native-sound'
target 'ExampleTests' do
inherit! :search_paths
# Pods for testing
end
use_native_modules!
end
target 'Example-tvOS' do
# Pods for AntrimElimChurch-tvOS
target 'Example-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
target 'OneSignalNotificationServiceExtension' do
pod 'OneSignal', '>= 2.9.3', '< 3.0'
end
end
I think you need to upgrade pod file as there are lots of changes from 62 to 63.
Here is sample for RN 63
https://raw.githubusercontent.com/react-native-community/rn-diff-purge/release/0.63.0-rc.1/RnDiffApp/ios/Podfile
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 'RnDiffApp' do
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
target 'RnDiffAppTests' 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 'RnDiffApp-tvOS' do
# Pods for RnDiffApp-tvOS
target 'RnDiffApp-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
I my case, I just changed these lines. At the Podfile and it's fixed my issue.
platform :ios, '9.0'
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
TO
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'
I had to update folly pods to
pod 'RCT-Folly', :podspec => '../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec', :modular_headers => false
from
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec', :modular_headers => false
I needed to update my Podfile spec reference to fix this, specifically for call invoker.
to this: pod 'React-callinvoker', :path => "../node_modules/react-native/ReactCommon/callinvoker"
from this: pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"
UPDATE for RN 0.64.0 :
I ran into similar problem when I upgraded my project RN to 0.64.0. The podfile was not installing. So I deintegrate pod and deleted pod file.
rm podfile
pod deintegrate
Then I created new empty project. Took its podfile and replace it with mine.
Please check my old/new file.
Old Podfile:
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'
pre_install do |installer|
puts("Image fix for ios14: remove this when upgradeing to >= 0.63.3")
find = "_currentFrame.CGImage;"
replace = "_currentFrame.CGImage ;} else { [super displayLayer:layer];"
op = `sed -ie "s/#{find}/#{replace}/" ../node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m`
puts("Image fix for ios14 done")
end
target 'Fomoyolo' do
config = use_native_modules!
use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
:hermes_enabled => false
)
# Pods for Fomoyolo
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/'
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'RNSVG', :path => '../node_modules/react-native-svg'
pod 'Firebase/Messaging'
pod 'RNGoogleSignin', :path => '../node_modules/#react-native-community/google-signin'
# pod 'RNFirebase', :path => '../node_modules/react-native-firebase/ios'
use_native_modules!
end
New Podfile:
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
platform :ios, '12.0'
target 'Fomoyolo' do
config = use_native_modules!
use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
:hermes_enabled => false
)
# Enables Flipper.cd
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
use_flipper!()
post_install do |installer|
react_native_post_install(installer)
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
end
end
end
end
At the end I have added post_install to force all libraries to install deployment 12.0.
First its not duplicated. Because i have different issue. I upgraded my react Native version to '0.62.2' (I wish I hadn't upgraded). I'm dealing with a lot of problems right now.This is my problem now No podspec found for React-Core in ../node_modules/React and I couldn't solve it
It is seen that there is always wrong path in similar problems. But even though I wrote the correct path, it gives an error. Also when I look at '../node_modules/react-native' I can't see the React-Core file here
[![enter image description here][1]][1]
I found similar problems and solutions. as in the examples below
No podspec found for `React-Core` in `../node_modules/react-native/React`
No podspec found for `React-Core` in `../node_modules/react-native`
pod install
Analyzing dependencies
Fetching podspec for DoubleConversion from ../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec
[!] No podspec found for React-Core in ../node_modules/React
Podfile
platform :ios, '9.0'
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
target 'DGFonder' do
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/React'
pod 'React-DevSupport', :path => '../node_modules/react-native/React'
pod 'React-fishhook', :path => '../node_modules/react-native/Libraries/fishhook'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
p
end
swift4 = ['Charts']
post_install do |installer|
installer.pods_project.targets.each do |target|
targets_to_ignore = %w(React yoga)
if targets_to_ignore.include? target.name
target.remove_from_project
end
target.build_configurations.each do |config|
if swift4.include?(target.name)
config.build_settings['SWIFT_VERSION'] = '4.1'
end
end
end
end
```
[1]: https://i.stack.imgur.com/NNLjD.png
React is now part of react-native in node_modules. So, you need to update your React-Core pod as:
pod 'React-Core', :path => '../node_modules/react-native/React'
Notice react-native in path specified.
I got the same issue this is because of node_modules
just do following steps
remove all node_modules
run npm i and check if there is any Vulnerabilities then perform npm audit fix
go to ios folder
run pod install
and it will work
i also face the same issue,
solution:-
you have updated git clone package
npm install
3.open path nodemodules/rn-fetch-blob
open rn-fetch-blob.podspec file
change React/native to React-native
cd ios && pod install
7.for android open android studio and then open your project android folder in android studio
8.for ios first go to ios folder of your project and then open RECA.xcworkspace
9.Run build in Xcode
Thanks
App get crashed with the above message. Unable to view my app screen.
Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'DevSettings' could not be found. Verify that a module by this name is registered in the na..., stack:
platform :ios, '9.0'
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
target 'App' do
# Pods for App
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
#pod 'BVLinearGradient', :path => '../node_modules/react-native-linear-gradient'
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/'
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
pod 'rn-fetch-blob', :path => '../node_modules/rn-fetch-blob'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'react-native-cameraroll', :path => '../node_modules/#react-native-community/cameraroll'
target 'AppTests' do
inherit! :search_paths
# Pods for testing
end
use_native_modules!
end
target 'App-tvOS' do
# Pods for App-tvOS
target 'App-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
I had the same error and the problem was that I built the app in Release mode but the main.jsbundle was dev mode.
Using react-native#0.61.5
I stopped the Metro process and run again
react-native run-ios --configuration Release --device --scheme="MyTargetScheme"
For us the issue was that we were (manually) building the RN bundle for our production app without setting the dev value in the react-native CLI.
When testing on simulator or device with a debug configuration in Xcode, this was not a problem. But since we archive for the App Store with a release config, we were seeing this crash in production.
The react-native bundle command has the --dev switch set to true by default. So the solution was simply to add --dev false to the bundle command.
In my case, my issue is resolved by node -v changes.
Initially I have used node 9.4.0 and then I have changed the node to 12.
Due to this version change the above error occurs.
So I have changed to node 9.4.0 and rebuild the app in release mode. It works fine
Any one know why the node version changes failed to bundle the app in release mode
In my specific situation, I was using a deprecated version of expo/ex-navigation , in RN 0.64.2 we had one problem, because RN doesn't understood the #2x.android or similars casts to choose the right image for an Icon. The problem is Described here : #31348.
I sold my conflicts locally inside node_modules and make Android work fine (then I forked and create a correction under my control), but when I came back to work in my IoS problems, I forgot to use this correction.
So, my problem was occurring in one lib i had in my node_modules, and as I extensively searched, this problems use to happen in this kind of situation.
So if #takameyer solution doesn't work as it doesn't to me, I suggest taker a look in your node_modules dependencies...
probably trying to build your bundle thought react-native-cli will give you an better log then building this in xcode, since in my case xcode build worked but give-me a run-time error(Release).
I hope it help someone in the future.
This crash reason is when your Target is Release Mode and your bundle is Development Mode.
So my iOS target was set to Release
And my bundle was build to Development, with this command :
react-native bundle --entry-file='index.js' --bundle-output='./ios/main.jsbundle' --platform='ios' --assets-dest='./ios'
So to fix this, i build again my bundle with this command.
react-native bundle --entry-file='index.js' --bundle-output='./ios/main.jsbundle' --dev=false --platform='ios' --assets-dest='./ios'
And works.
Thanks #sumizome and #strdr4605 i made this with your answers.
Performed RN upgrade from RN0.60 to RN0.61. Build failed with iOS, due to the following issue:
/react-native/React/Base/RCTBridgeModule.h:10:9: 'React/RCTDefines.h' file not found
I am aware of this breaking changes. (React.xcodeproj is deprecated)
Try a few things
npx react-native-clean-project & re-setup project
remove Pods/ & pod install
...running out of idea...
Here's how my podfile looks like.
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/'
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'ReactCommon/jscallinvoker', :path => '../node_modules/react-native/ReactCommon'
pod 'ReactCommon/turbomodule/core', :path => '../node_modules/react-native/ReactCommon'
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
# Required by RNFirebase
pod 'Firebase/Core', '~> 6.9.0'
pod 'RNFirebase', :path => '../node_modules/react-native-firebase/ios'
pod 'Fabric', '~> 1.10.2'
pod 'Crashlytics', '~> 3.14.0'
# FBSDK
pod 'react-native-fbsdk', :path => '../node_modules/react-native-fbsdk'
pod 'react-native-netinfo', :path => '../node_modules/#react-native-community/netinfo'
pod 'react-native-image-picker', :path => '../node_modules/react-native-image-picker'
pod 'react-native-splash-screen', :path => '../node_modules/react-native-splash-screen'
pod 'react-native-webview', :path => '../node_modules/react-native-webview'
Here's my solution after spending a full day in digging the reason why,
.
.
.
.
TLDR;
You need to add .podspec to podfile for whichever 3rd party/custom library that complain unable to find React/{whatever.h}
3rd party Libraries
If you are using a 3rd party library (Yarn/NPM/etc)
Copy podspec from other 3rd party library (eg, RNDeviceInfo/etc..)
Create own podspec by replacing a few item (s.name, s.source) I actually left others as default but you can modify as per your usage if you want
s.name = "NoSupportedLib"
s.source = { :git => "https://github.com/react-native-community/NoSupportedLibName.git", :tag => "v#{s.version}" }
You might want to take care the following, because not all your dependency may store under the folder path ios/**/your.m & your.h files
s.source_files = "ios/**/*.{h,m}"
Add new line to podfile
pod 'NoSupportedLib', :path => '../node_modules/NoSupportedLib'
Pod install
Local Dependencies
In the case where you have a local dependency, you should do the same as well (instead of adding the .a file into your Xcode's Linked Framework and Libraries.)
Follow the same steps as described on top
At step 2 where you declare the s.source & s.source_files, you shall do the following: (Assumption you are create this custom.podspec at the same custom library path, you would otherwise need to modify the s.source path as your need)
s.source = { :http => 'file:' + __dir__ + '/' }
s.source_files = "customLib/*.{h,m}"
Add new line to podfile
pod 'customLib', :path => '../localDependency/customLib'
Sub-points
I tried adding React under my scheme as build target, apparently it does not help. I think for project that is >=RN0.60, we are meant to use autolinking provided by ReactNative? Hence to keep our Xcode's Linked Framework and Libraries clean.
I've had the same issue a while ago. It was fixed after: product > scheme > edit scheme, go to the build tab and add react as the first target.
I had this same issue, I went into /node_modules/react-native/React/Base/RCTBridgeModule.h and changed #import <React/RCTDefines.h> into
#if __has_include("RCTDefines.h")
#import "RCTDefines.h"
#else
#import <React/RCTDefines.h>
#endif
ref below link
https://github.com/facebook/react-native/issues/26754#issuecomment-539550146
Go to Project navigator > Libraries > RNFetchBlob.xcodeproj
Click on Build Settings and then the first item under "Targets"
Scroll down to 'Search Paths' -> 'Header Search Paths'
Make sure to have enable filter 'All'
Add the following entry (click '+'): ${SRCROOT}/../../../ios/Pods/Headers
Make sure to set it to recursive.
Clean (cmd + shift + K) and re-build (cmd + B)
Solved here