본문 바로가기
ETC/Flutter

[Flutter] CocoaPods's specs repository is too out-of-date to satisfy dependencies error

by 안주형 2022. 1. 13.

필자는 현재 M1 13 Pro를 사용하고 있고, 플러터를 빌드하다 보면 한 번씩 아래와 같은 오류가 뜨면서 빌드가 되지 않을 때가 있다.

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 13 Pro.

CocoaPods의 설정이 깨졌거나, Firebase의 SDK의 버전 종속성이 맞지 않을 때 발생하는데 다음 명령어로 이 오류를 해결할 수 있다.

 

먼저 Window 혹은 Mac Intel chip 사용자의 경우 터미널에서 다음 명령어를 실행하면 해결할 수 있다.

  1.  프로젝트 내부의 /ios폴더로 이동
  2.  Podfile.lock 파일 삭제
  3.  pod install --repo-update
  4.  flutter clean
  5.  flutter run(빌드)

다음 M1 chip 사용자의 경우에는 아래의 명령어를 실행하여 해결할 수 있다.

  1. 프로젝트 내부의 /ios폴더로 이동
  2. Podfile.lock 파일 삭제
  3. ffi가 설치되어 있지 않다면 먼저 설치한다.  sudo arch -x86_64 gem install ffi
  4. arch -x86_64 pod install --repo-update
  5. flutter clean
  6. flutter run (빌드)

 

 

참고

 

Flutter: CocoaPods's specs repository is too out-of-date to satisfy dependencies

Current, I was trying to add firebase_core: ^0.5.0+1 and firebase_crashlytics: ^0.2.1+1 packages in my flutter project with the latest versions, It works without any trouble in Android but in iOS, ...

stackoverflow.com

 

댓글