0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Flutter iOSにてGTMSessionFetcher/Coreのバージョンを何とかする

Last updated at Posted at 2023-03-09

Flutterでアプリを開発中でiOS向けにビルドしたとき、pod install のステップにて以下のエラーが発生した。

    [!] CocoaPods could not find compatible versions for pod "GTMSessionFetcher/Core":
      In Podfile:
        firebase_auth (from `.symlinks/plugins/firebase_auth/ios`) was resolved to 4.2.10, which depends on
          Firebase/Auth (= 10.3.0) was resolved to 10.3.0, which depends on
            FirebaseAuth (~> 10.3.0) was resolved to 10.3.0, which depends on
              GTMSessionFetcher/Core (< 4.0, >= 2.1)

        google_sign_in_ios (from `.symlinks/plugins/google_sign_in_ios/ios`) was resolved to 0.0.1, which depends on
          GoogleSignIn (~> 6.2) was resolved to 6.2.4, which depends on
            GTMSessionFetcher/Core (< 3.0, >= 1.1)

        mobile_scanner (from `.symlinks/plugins/mobile_scanner/ios`) was resolved to 0.0.1, which depends on
          GoogleMLKit/BarcodeScanning (~> 3.2.0) was resolved to 3.2.0, which depends on
            MLKitBarcodeScanning (~> 2.2.0) was resolved to 2.2.0, which depends on
              MLKitCommon (~> 8.0) was resolved to 8.0.0, which depends on
                GTMSessionFetcher/Core (~> 1.1)

firebase_authとmobile_scannerでGTMSessionFetcher/Coreの依存バージョンが矛盾する。

podspec

MLKitVisionMLKitCommon のpodspecファイルをダウンロードし、iosディレクトリに置いておく。

この記事を書いている時点の最新は以下の通り。

https://github.com/CocoaPods/Specs/blob/master/Specs/8/1/e/MLKitVision/4.2.0/MLKitVision.podspec.json
https://github.com/CocoaPods/Specs/blob/master/Specs/c/c/6/MLKitCommon/8.0.0/MLKitCommon.podspec.json

※バージョンがあがったら、適宜最新を参照してください

GTMSessionFetcher/Core

上記でダウンロードして配置した MLKitVision.podspec.json と MLKitCommon.podspec.json の中で GTMSessionFetcher/Coreのバージョンが 1.1 となっている箇所を 2.1 に変更する。

ios/Podfile

ios/Podfileの target 'Runner' do の中で、上記で編集したファイルを参照するように指定する。

  pod 'MLKitVision', :podspec => 'MLKitVision.podspec.json'
  pod 'MLKitCommon', :podspec => 'MLKitCommon.podspec.json'
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?