[Flutter + Dart]

[Flutter] iOS 시뮬레이터 Run 중 발생 오류 - Error output from CocoaPods : [!] The version of CocoaPods used to generate the lockfile (1.11.3) is higher than the version of the current executable (1.11.2).

ddgoori 2023. 1. 6. 14:15

기존에 개발자가 간략하게 플러터 프로젝트를 생성하고 튜토리얼 화면을 만들어 놓았는데, 이를 확인하기 위해 내 노트북에서 플러터 프로젝트를 시뮬레이터로 돌리는 것부터 에러가 발생했다.

 

Error output from CocoaPods:

[!] The version of CocoaPods used to generate the lockfile (1.11.3) is higher than the version of the current executable (1.11.2). Incompatibility issues may arise.
[!] Automatically assigning platform `iOS` with version `11.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies. To update the CocoaPods specs, run: pod repo update
Error running pod install
Error launching application on iPhone 12.

 

기존에 개발자가 사용한 버전이 낮아서 발생하는 문제다.

해결방법

 

아래 파일을 지우고

ios/podfile.lock

 

$pod install 실행

 

그러나 또다른 오류 발생

 

Analyzing dependencies

firebase_analytics: Using Firebase SDK version '10.3.0' defined in 'firebase_core'

firebase_auth: Using Firebase SDK version '10.3.0' defined in 'firebase_core'

firebase_core: Using Firebase SDK version '10.3.0' defined in 'firebase_core'

Warning: firebase_app_id_file.json file does not exist. This may cause issues in upload-symbols. If this error is unexpected, try running flutterfire configure again.

firebase_crashlytics: Using Firebase SDK version '10.3.0' defined in 'firebase_core'

firebase_dynamic_links: Using Firebase SDK version '10.3.0' defined in 'firebase_core'

firebase_messaging: Using Firebase SDK version '10.3.0' defined in 'firebase_core'

[!] CocoaPods could not find compatible versions for pod "Firebase/Auth":

  In Podfile:

    firebase_auth (from `.symlinks/plugins/firebase_auth/ios`) was resolved to 4.2.3, which depends on

      Firebase/Auth (= 10.3.0)

 

None of your spec sources contain a spec satisfying the dependency: `Firebase/Auth (= 10.3.0)`.

 

You have either:

 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.

 * mistyped the name or version.

 * not added the source repo that hosts the Podspec to your Podfile.

 

 

- iOS 11 버전을 Podfile에 적어야 해결된다 하여 보았지만 이미 적혀있어서 이것이 원인은 아닌 것으로 보인다.

 

M2 버전의 문제일 수도 있는데..

- https://stackoverflow.com/questions/65943260/how-do-i-resolve-the-pod-install-error-on-flutter

 

How do I resolve the pod install error on flutter?

cloud_firestore: ^0.16.0 firebase_auth: ^0.20.0+1 smooth_star_rating: ^1.0.4 google_maps: ^4.0.0 firebase_core: ^0.7.0 rxdart: ^0.24.1 Pod install Analyzing dependencies cloud_firestore:...

stackoverflow.com