2017-07-25 172 views
1

我在我的應用中使用RxSwift和其他Rx-pod,根據我的Podfile.lock我使用RxSwift (3.2.0),但現在我想將Pod更新爲最新版本。Cocoapods正在安裝舊的Pod版本

因此,我從我的Podfile中刪除了4個Rx ..-豆莢,並運行pod install,這樣將該豆莢從項目和Podfile.lock中刪除。我重新添加4個Rx ..-豆莢,並再次運行pod instal。此安裝RxSwift 2.6.1 ... 爲什麼? - 我期待它來安裝的RxSwift最新的穩定版本,像3.6.1 ..

我試圖通過消除一切上市:gem list --local | grep cocoapods並通過運行重新安裝的CocoaPods:gem install cocoapods

我也試過運行pod repo update沒有成功。

我也嘗試過只運行pod update,沒有先卸載Pod,也是相同的結果。

我懷疑這是一個問題,我的cocoapods -gem,而不是RX-莢..

編輯添加Podfile

source 'https://github.com/CocoaPods/Specs.git' 
# Uncomment this line to define a global platform for your project 
platform :ios, '9.0' 
# Uncomment this line if you're using Swift 
use_frameworks! 

target 'MyApp' do 
    pod 'BrightFutures' 
    pod 'Alamofire' 
    pod 'MBProgressHUD' 
    pod 'Fabric' 
    pod 'Crashlytics' 
    pod 'Analytics', '~> 3.0' 
    pod 'SwiftyJSON' 
    pod 'Eureka', '~> 2.0.0-beta.1' 
    pod 'RxCocoa' 
    pod 'RxSwift' 
    pod 'INTULocationManager' 
    pod 'ReachabilitySwift', '~> 3' 
    pod 'RxSwiftExt' 
    pod 'RxMKMapView' 
end 

post_install do |installer| 
    installer.pods_project.targets.each do |target| 
     target.build_configurations.each do |config| 
      config.build_settings['SWIFT_VERSION'] = '3.0' 
     end 
    end 
end 

編輯新增pod outdated轉儲:

Analyzing dependencies 
The following pod updates are available: 
- Alamofire 4.3.0 -> 4.5.0 (latest version 4.5.0) 
- Analytics 3.5.7 -> 3.6.4 (latest version 3.6.4) 
- BrightFutures 5.1.0 -> 5.2.0 (latest version 6.0.0-beta.1) 
- Crashlytics 3.8.3 -> 3.8.5 (latest version 3.8.5) 
- Eureka 2.0.0-beta.1 -> 2.0.1 (latest version 3.1.0) 
- Fabric 1.6.11 -> 1.6.12 (latest version 1.6.12) 
- Result 3.1.0 -> 3.2.3 (latest version 3.2.3) 
- RxCocoa 3.2.0 -> 3.6.1 (latest version 3.6.1) 
- RxSwift 3.2.0 -> 3.6.1 (latest version 3.6.1) 
+0

你是如何聲明'RxSwift'莢? – EmilioPelaez

+0

看我的編輯.... – Wiingaard

+0

你試過運行'pod更新RxSwift'嗎? – EmilioPelaez

回答

1

你可以試試看翼:

結算的CocoaPods的緩存:

  • 室射頻 「$ {HOME} /圖書館/緩存/的CocoaPods」
  • 室射頻 「`pwd` /莢/」(而在項目的目錄)
  • 最後pod update

如果您正在使用0.38.0.beta1,你可以只使用pod cache clean


重生的一切:

  • RM -rf〜/圖書館/緩存/的CocoaPods
  • 室射頻豆莢; rm -rf〜/ Library/Developer/Xcode/DerivedData/*
  • pod deintegrate;莢設置;吊艙安裝

設置版本

pod 'RxSwift', '~> 3.0' # last version is 3.6.1 
1

RxMKMapView最新版本需要RxCocoa 2.x.x.顯然他們需要更新Podspec,以允許RxCocoa 3.x.x.他們在提交時這樣做了,但它從未上傳到cocoapods(或者可用)。所以我通過從該提交獲取吊艙來解決問題。因爲pod RxCocoa沒有最低版本要求,cocoapods只會得到最新版本的RxCocoa,它滿足pod RxMKMapView,這是一箇舊版本(2.x.x)。這就是爲什麼我以爲出事了與我的Cocoapod安裝,原來申報通緝艙體的最低版本是非常重要的。這解決了這個問題:

pod ‘RxCocoa’, ‘~> 3’ 
pod ‘RxSwift’, ‘~> 3’ 
pod ‘RxMKMapView’, :git => ‘https://github.com/RxSwiftCommunity/RxMKMapView.git', :commit => ‘6b86c6a’ 
+0

謝謝!與RxSwiftUtilities降級RxSwift相同的問題。安裝了最新的RxSwiftUtilities提交併解決了問題。 – RealNmae