gpt4 book ai didi

ios - 无法在 CocoaPods 中安装 React 子规范

转载 作者:可可西里 更新时间:2023-11-01 05:42:45 26 4
gpt4 key购买 nike

这是我当前的 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。

最佳答案

我在 0.60 版中遇到了同样的问题。我发现地理定位已从 react-native 核心中移出。

通过将它作为一个单独的模块来修复它。

安装说明和文档位于 react-native-geolocation .

附言毕竟需要导入!

关于ios - 无法在 CocoaPods 中安装 React 子规范,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56048803/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com