【问题标题】:Can't update pods to the latest version无法将 pod 更新到最新版本
【发布时间】:2023-03-19 17:03:08
【问题描述】:

我正在使用 react-native,我正在尝试使用来更新 pod

pod update

但它什么也没更新。但是,当我使用

pod outdated

显示这个

    Updating spec repo `master`
    $ /usr/bin/git -C /Users/IG/.cocoapods/repos/master fetch origin --progress
    remote: Counting objects: 15, done.        
    remote: Compressing objects: 100% (14/14), done.        
    remote: Total 15 (delta 11), reused 0 (delta 0), pack-reused 0        
    From https://github.com/CocoaPods/Specs
        1bb3a72da66..f6d4f6f0e14  master     -> origin/master
    $ /usr/bin/git -C /Users/IG/.cocoapods/repos/master rev-parse --abbrev-ref HEAD
    master
    $ /usr/bin/git -C /Users/IG/.cocoapods/repos/master reset --hard origin/master
    HEAD is now at f6d4f6f0e14 [Add] ScanbotSDK 0.0.2
    Analyzing dependencies
    The color indicates what happens when you run `pod update`
    <green>      - Will be updated to the newest version
    <blue>   - Will be updated, but not to the newest version because of specified version in Podfile
    <red>        - Will not be updated because of specified version in Podfile

    The following pod updates are available:
    - Firebase 3.17.0 -> (unused) (latest version 4.13.0)
    - FirebaseAnalytics 3.9.0 -> 3.9.0 (latest version 4.2.0)
    - FirebaseCore 3.6.0 -> 3.6.0 (latest version 4.0.20)
    - FirebaseInstanceID 1.0.10 -> 1.0.10 (latest version 2.0.10)
    - FirebaseMessaging 1.2.3 -> 1.2.3 (latest version 2.2.0)
    The following pods are deprecated:
    - Google

但是我的 podfile 没有指定任何版本:

platform :ios, '8.0'
use_frameworks!

target 'MyApp' do
    pod 'Google/SignIn'
    pod 'Firebase/Core'
    pod 'Firebase/Messaging'
end

我有 react-native 0.47.2 代码 9.2 cocoapods 1.5.0

【问题讨论】:

    标签: ios xcode react-native cocoapods


    【解决方案1】:

    pod update 不会自动更新master-repo

    你可以试试:

    pod repo update
    
    pod deintegrate
    
    pod install
    

    它应该根据需要更新所有内容,并进行全新安装。

    【讨论】:

    • 我试过了,它仍然下载相同的版本
    • 那么它来自你的 podspec。你能在你的 Podfile 中明确写出最后一个版本号吗?或者你能打印你的 podspec 吗?
    • 我想我找到了问题。我从 podfile 中删除了 Google/SignIn 并自动安装了最新版本。我想我需要找到使用 Google/SignIn pod 的替代解决方案,因为它已被弃用。
    【解决方案2】:

    我发现了问题。 我从 podfile 中删除了“Google/SignIn”,并且所有 pod 都已更新。 不知道如何更换该吊舱,但我猜 Google 有另一个吊舱,因为他们弃用了这个吊舱。

    【讨论】:

      【解决方案3】:

      尝试最新的 GoogleSignIn pod:

      pod GoogleSignIn
      

      &更多参考打开Google Developer Portal

      【讨论】:

        猜你喜欢
        • 2018-12-04
        • 1970-01-01
        • 2016-02-26
        • 2020-09-16
        • 2019-09-14
        • 2019-08-12
        • 2020-06-16
        • 2020-05-12
        • 1970-01-01
        相关资源
        最近更新 更多