개발/Flutter

Error running pod install

leebera_ 2022. 6. 10. 21:53

문제점

내가 발생한 문제는 두가지이다.

 

문제 1

firebase플러그인에 대한 내용이 포함된 에러 및 버전을 자동으로 9.0으로 맞춘다는 메시지 출력

[!] Automatically assigning platform iOS with version 9.0 on target Runner because no platform was specified. Please specify a platform for this target in your Podfile.

원인 : firebase를 사용하기위한 ios minimum버전을 맞추지않아 발생

 

문제 2

LoadError -dlopen~~~ 에러 발생

원인 : Apple Silicon(M1)에 맞지않는 cocoapods 문제로 인해 발생

 

이외에 다른 패키지의 버전이 맞지 않아 발생하는 경우 일 수 있는데 이 경우엔 아래 링크 참고

https://leeseongho.tistory.com/165

 

해결방법

 

문제 1 해결

ios폴더 내의 Podfile에서 ' # platform :ios, '9.0' ' 문장을 주석 해제하고 사용중인 firebase플러그인에 맞는 버전을 링크에서 확인하고 버전을 맞추도록 한다.

글 작성하는 시점 기준에선 귀찮으면 11.0으로 올리면 모두 동작하는 것으로 나와있다.

 

문제 2 해결

터미널에서 아래 명령어 입력

sudo arch -x86_64 gem install ffi

# Podfile이 있는 ios폴더로 이동한 후에 아래 명령어 입력
arch -x86_64 pod install
만약 이 문제가 이전에 해결했는데 또 발생했다면 터미널에서 프로젝트 내의 Podfile이 있는 위치로 이동해서 두번째 명령만 다시 실행해보고 시도하면 된다.

 


 

참고

firebase플러그인 버전오류

 

firebase_analytics 7.0.1, cannot build on iOS, CocoaPods could not find compatible versions for pod "firebase_analytics · Issue

Bug report Describe the bug After implementing Firebase Analytics i get the following error while trying to build: [!] CocoaPods could not find compatible versions for pod "firebase_analytics&...

github.com

 

m1 cocoapod

 

error running pod install error launching application on iphone11 Pro Max

I finished my flutter app, and i want to test it in ios device, so i used a mac laptop and i did all the installations but when i did the command "flutter run" i got this error Launching lib/main....

stackoverflow.com

2번 해결방법

 

"LoadError -dlopen..." while pod install in Mac M1

I have Mac M1 and am getting following error while using pod install to build flutter project in iOS. I have already installed home brew, uninstall/install cocoapods using sudo arch -x86_64 gem ins...

stackoverflow.com

 

How to run CocoaPods on Apple Silicon (M1)

I have a Flutter project that I'm trying to run on iOS. It runs normally on my Intel-based Mac, but on my new Apple Silicon-based M1 Mac it fails to install pods. LoadError - dlsym(0x7f8926035eb0,

stackoverflow.com