繁体   English   中英

CocoaPods 找不到 pod“Alamofire 5.0.0-rc.2”的兼容版本

[英]CocoaPods could not find compatible versions for pod "Alamofire 5.0.0-rc.2 "

我在我的 swift 项目中通过 CocoaPods 使用'Alamofire', '~> 5.0.0-beta.5' 现在我正在尝试使用Alamofire (~> 5.0.0-rc.2)

不幸的是,我在应用“pod install”命令行后出现以下错误:

CocoaPods 找不到 pod "Alamofire" 的兼容版本:在 Podfile: Alamofire (~> 5.0.0-rc.2)

有什么帮助吗?

由于发布是新版本(仅 2 天前),您首先需要更新本地规范存储库。

在您的Podspec文件中,输入:

pod 'Alamofire', '~> 5.0.0-rc.2'

在终端上,运行:

pod update

然后:

pod install

输出:

Analyzing dependencies
Downloading dependencies
Using Alamofire (5.0.0-rc.2)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.

也许在某些情况下,当其他点不起作用时。 检查这个问题:

platform :ios, '9.0' // check platform :ios version

target "app_name" do
    pod 'Alamofire', '~> 5.0.0-rc.3'
end

在我的情况下,部署目标设置为 9.0,但 Alamofire 5+ 是 10.0 版本。

/** Alamofire.podspec **/
...
s.ios.deployment_target = '10.0'
s.osx.deployment_target = '10.12'
s.tvos.deployment_target = '10.0'
s.watchos.deployment_target = '3.0'

s.swift_versions = ['5.0', '5.1']
...

只需将platform :ios, '9.0'替换为platform :ios, '10.0'问题就会解决。 来源:Alamofire.podspec

我认为您可以先使用pod search Alamofire ,然后使用列表中的版本。 如果版本不是必需的,您可以使用pod 'Alamofire'

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM