【发布时间】:2019-05-08 20:46:11
【问题描述】:
这是我当前的 Podfile:
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'atom' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
pod 'Firebase/Core', '~> 5.20.1'
pod 'Firebase/Firestore', '~> 5.20.1'
pod 'Firebase/Auth', '~> 5.20.1'
pod 'Firebase/Storage', '~> 5.20.1'
pod 'Firebase/Database', '~> 5.20.1'
pod 'Firebase/Messaging', '~> 5.20.1'
pod 'Firebase/Functions', '~> 5.20.1'
pod 'Firebase/DynamicLinks', '~> 5.20.1'
pod 'Firebase/Performance', '~> 5.20.1'
pod 'react-native-image-picker', :path => '../node_modules/react-native-image-picker'
pod 'react-native-maps', :path => '../node_modules/react-native-maps'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == "React"
target.remove_from_project
end
end
end
当我尝试添加这个时:
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'RCTGeolocation',
]
我收到此错误:
$ pod install
Ignoring unf_ext-0.0.7.4 because its extensions are not built. Try: gem pristine unf_ext --version 0.0.7.4
Analyzing dependencies
Fetching podspec for `React` from `../node_modules/react-native`
Fetching podspec for `react-native-image-picker` from `../node_modules/react-native-image-picker`
Fetching podspec for `react-native-maps` from `../node_modules/react-native-maps`
[!] CocoaPods could not find compatible versions for pod "React/RCTGeolocation":
In Podfile:
React/RCTGeolocation (from `../node_modules/react-native`)
None of your spec sources contain a spec satisfying the dependency: `React/RCTGeolocation (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.
我尝试了pod repo update,但仍然出现错误。
我使用的是 React-native 0.59。部署目标 9.0。
【问题讨论】:
标签: ios react-native cocoapods