Cocoapods正在安装旧的Pod版本

Wii*_*ard 3 terminal ios cocoapods swift

RxSwift根据Podfile.lock我的使用RxSwift (3.2.0),我在我的应用程序中使用和其他Rx-pods ,但现在我想将Pod 更新到最新版本.

所以我删除了我使用的4个Rx ..- pod Podfile,然后运行pod install,这从项目中移除了pod Podfile.lock.我重新添加4个Rx ..- pod并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的一个问题,而不是The Rx-pods ..

编辑添加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
Run Code Online (Sandbox Code Playgroud)

编辑添加的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)
Run Code Online (Sandbox Code Playgroud)

nat*_*han 5

您可以尝试以下方法:

清除CocoaPods的缓存:

  • rm -rf"$ {HOME}/Library/Caches/CocoaPods"
  • rm -rf"`pwd`/Pods /"(在项目的目录中)
  • 最后 pod update

如果您使用的是0.38.0.beta1,则可以使用 pod cache clean


重生一切:

  • rm -rf~/Library/Caches/CocoaPods
  • rm -rf Pods; rm -rf~/Library/Developer/Xcode/DerivedData/*
  • pod deintegrate; pod设置; pod安装

设置版本

pod 'RxSwift', '~> 3.0' # last version is 3.6.1
Run Code Online (Sandbox Code Playgroud)