오류 메시지
firebase_core: Using Firebase SDK version '9.4.0' defined in 'firebase_core'
[!] CocoaPods could not find compatible versions for pod "Firebase/CoreOnly":
In Podfile:
firebase_core (from `.symlinks/plugins/firebase_core/ios`) was resolved to 1.21.1, which depends on
Firebase/CoreOnly (= 9.4.0)
None of your spec sources contain a spec satisfying the dependency: `Firebase/CoreOnly (= 9.4.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.
해결
일단, flutterfire로 firebase 연동을 하고 나서, flutter run - 으로 실행을 하려 보니,
이 메시지가 뜸.
IOS 폴더에서 cocoapod 업데이트를 해 줘야 하는데, M1 Mac 환경에서는 $ pod install
로 재설치를 해도
[!] CocoaPods could not find compatible versions for pod "Firebase/CoreOnly":
In Podfile:
firebase_core (from `.symlinks/plugins/firebase_core/ios`) was resolved to 1.21.1, which depends on
Firebase/CoreOnly (= 9.4.0)
메시지가 다시 뜬다.
해결법은
터미널에서
$ sudo arch -x86_64 gem install ffi
이후, Flutter의 IOS 폴더 경로에서
$ arch -x86_64 pod install --repo-update
를 실행해주면, 정상적으로 cocoapod 업데이트가 된다.