簡體   English   中英

ReachabilitySwift不能與CocoaPods一起安裝

[英]ReachabilitySwift can't be installed with CocoaPods

在我的Podfile中,我有:

pod 'ReachabilitySwift', '~> 3.0'

但是當我運行pod install ,除了ReachabilitySwift之外,所有框架都已正確設置:

Installing ReachabilitySwift 3 (was 2.4)

[!] Error installing ReachabilitySwift
[!] /usr/bin/git clone https://github.com/ashleymills/Reachability.swift.git /var/folders/cn/1zzgfkjj5xq3hm3g4351087r0000gn/T/d20170922-5156-v06cm4 --template= --single-branch --depth 1 --branch v3

Cloning into '/var/folders/cn/1zzgfkjj5xq3hm3g4351087r0000gn/T/d20170922-5156-v06cm4'...
warning: Could not find remote branch v3 to clone.
fatal: Remote branch v3 not found in upstream origin

通過此GitHub鏈接 ,我找到了推薦的解決方案:

請添加一個

 s.pod_target_xcconfig = { 'SWIFT_VERSION' => '3.0' } 

到podspec文件。 否則,每次安裝Pod后都會出現錯誤。

但是我不知道在哪里可以找到podspec文件,以及在什么地方插入此字符串。

您不必手動編輯podspec文件,這將涉及到分叉項目。

項目的podspec文件引用了錯誤的標記,您應該指定正確的標記並使用該標記,直到podspec文件被修復為止。

來自GitHub問題

Podspec仍在尋找舊的v3標簽,目前,手動指定回購標簽即可解決:

 pod 'ReachabilitySwift', :git => 'https://github.com/ashleymills/Reachability.swift.git', :tag => 'v3.0' 

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM