-
-
Save sjchmiela/6c079f2173938a9a61a7c6f053c45000 to your computer and use it in GitHub Desktop.
platform :ios, '10.0' | |
require_relative '../node_modules/react-native-unimodules/cocoapods.rb' | |
# don't just copy and paste this, notice that the target names should align with what is already in your Podfile | |
target 'YourAppNameHere' do | |
pod 'React', :path => '../node_modules/react-native', :subspecs => [ | |
'Core', | |
'CxxBridge', | |
'DevSupport', | |
'RCTText', | |
'RCTNetwork', | |
'RCTWebSocket', | |
'RCTAnimation', | |
'RCTImage', | |
] | |
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 'YourAppNameHereTests' do | |
inherit! :search_paths | |
end | |
end |
To get the Podfile working with react-native 0.60.5
I needed to make these changes:
- change:
platform :ios, '10.0'
- add:
require_relative '../node_modules/react-native-unimodules/cocoapods.rb'
- add:
use_unimodules!
As a result my Podfile now looks like this:
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 'myApp' do
# Pods for myApp
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/React'
pod 'React-DevSupport', :path => '../node_modules/react-native/React'
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 'myAppTests' do
inherit! :search_paths
# Pods for testing
end
use_native_modules!
end
target 'myApp-tvOS' do
# Pods for dinklage-tvOS
target 'myApp-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
Running a pod install --repo-update
then seemed to work (albeit took an age to install...)
How can I get the Podfile working for react native version 0.59?
I have added the following to my Podfile:
require_relative '../node_modules/react-native-unimodules/cocoapods.rb'
use_unimodules
Here is the error I ran into on pod install:
[!] CocoaPods could not find compatible versions for pod "UMTaskManagerInterface":
In Podfile:
UMTaskManagerInterface (from ../node_modules/unimodules-task-manager-interface/ios)
Specs satisfying the UMTaskManagerInterface (from ../node_modules/unimodules-task-manager-interface/ios) dependency were found, but they required a higher minimum deployment target.
@smruti96 hi Do you found the solution? I get error while running pod install too after i change platform :ios, '10.0'. RN0.59
[!] Unable to find a specification for React-Core
depended upon by UMReactNativeAdapter
You have either:
- out-of-date source repos which you can update with
pod repo update
or withpod install --repo-update
. - mistyped the name or version.
- not added the source repo that hosts the Podspec to your Podfile.
Hello, I'm facing the exact same problem as @nolife08021. Any ideas on how to fix it? Thx
I manage to work around this error by downgrading the version of react-native-unimodules to 0.6.0. It seems that there is an issue with version 0.7.0
@apostolou try these versions too, see how high you can go before the error occurs again ^0.7.0-rc.1
^0.7.0-rc.2
^0.7.0-rc.3
^0.7.0-rc.4
Have the same issues as @apostolou. 0.6.0
worked, but starting from 0.7.0-rc.1
have the same error as @nolife08021.
Oh no...I'd like to keep my project consistent by using only packages that are autolinked. Might as well make use of the feature since it's available. At least I know whenever I clone my code to a new location, I don't have to dig through my dependencies and figure out individual packages to perform setup steps for.