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

gha*_*raa 3 ios cocoapods swift alamofire

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

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

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

有什么帮助吗?

alx*_*ves 12

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

在你的Podspec文件中,把这个:

pod 'Alamofire', '~> 5.0.0-rc.2'
Run Code Online (Sandbox Code Playgroud)

在终端上,运行:

pod update
Run Code Online (Sandbox Code Playgroud)

然后:

pod install
Run Code Online (Sandbox Code Playgroud)

输出:

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.
Run Code Online (Sandbox Code Playgroud)