본문 바로가기
⌨️flutter

[에러!!!!!]: [!] CocoaPods could not find compatible versions for pod ....

by 덩크냥 2023. 9. 19.

alan voice라는 플러그인을 사용하려고 한다!.. 그러나 pubspec.yaml에 추가한 순간부터 빌드가 갑자기 안되기 시작한ㄷr.....

 

어찌저찌 해결해보려고 ios경로에서 pod install 실행시...

우선 주어진 에러메세지를 정독해서 해결해 볼 노력을 해보자,,,,, 많이 심란하지만.

 

거슬리는 노란 문구부터.  Podfile에 ios 버전이 지정안돼서 알아서 11.0으로 해줬다고 한다. 

Podfile 안에

before:

target 'Runner' do
use_frameworks!
use_modular_headers!

flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end

여기 첫번째 줄 바로밑에 platform :ios, '13.0' 

를 추가해준다. (13.0 이든 뭐든 원하는걸로!)

 

after:

target 'Runner' do
platform :ios, '13.0'
use_frameworks!
use_modular_headers!

flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end

 

자 다음스텝으로 빨간에러메세지를 해결해보자........ (제발.,ㅜ)

 

[!] CocoaPods could not find compatible versions for pod "alan_voice":
  In Podfile:
    alan_voice (from `.symlinks/plugins/alan_voice/ios`)

Specs satisfying the `alan_voice (from `.symlinks/plugins/alan_voice/ios`)` dependency were found, but they required a higher minimum deployment target.

 

우선 CocoaPods에 문제가 있는걸 알 수 있다.(CocoaPods는 ios관련 dependency manger 라고 이해하고 넘어가자!)

그렇다면..? xcode를 켜주자!!!!! (OS 관련문제는 싹다 xcode에서)

 

=> Deployment Target 수정

higher minimum deployment target을 요구한다니까.. 근데 지금은 9.3 compatiable로 되어있네요!!!!!!!!!! 바꿉시다 센터에있는 minimum deployment도요!

 

네,, 13으로 다 바꿔볼까요?

Minimum Deployment & 우측의 Project Document 바꿨음!

좋아요. 이제 기도해봅시다. 

i)프로젝트 위치에서 flutter clean   -> flutter pub get

ii)cd ios 한뒤 pod install 입력!

 

 

실패했다...똑같은 메세지가 출력된다. 여기서 울더라도 포기는 하지 말자.

정리해보면, 에러메세지에서 xcode가서 바꿔주는 가설은 틀린거같지 않다!!!! 

그렇다면,,?> 

또다른 가설,

1. minimum deployment숫자가 더 높아야하는가? 그럼 어느정도로?

2. 플러그인이 버그투성이다

 

1번부터 해보자.. 무작정 숫자 올리는건 무의미할것이다.

자, 

In Podfile:
    alan_voice (from `.symlinks/plugins/alan_voice/ios`)

에러메세지 중 일부를 가져왔는데 어떤 경로를 보여준다. 그렇다면 경로 찾아서 열어봐야한다.  ios에서 pod install했기에 

bingo~

이런 경로가 있었다!. 판도라의 상자를 여는 기분으로 주어진 경로를 open해보면?

 

선물을 받은 기분이다. 정확히 가설 1번이 맞은 느낌이다. 계속 진행해보겠다.  xcode에서 필요한 부분 15로 바꿔준다(아까처럼)

 

잠시만.!  아까 xcode에서 수정했긴했는데,,, 제대로 이해하고 넘어가보기 위해 원래값으로 다시 바꿔보고 실험(?) 진행해보자.  (문제해결력을 높이기위해?... ㅎㅎ)

맨 위에서 처음 노란 주의 에러메세지는 임의로 11로 ios버전을 맞춰준대서 내가 버전을 직접 추가했었다(13.0 으로했었지!!)

근데 안돼서 xcode로 넘어간것인데.. 제대로 15.0으로 하고 넘어간 것이 아니기에

일단 다른거(XCode건든것들) 원래대로 돌려놓고 ios/Podfile 에서 버전을 15.0으로 바꿔줘보자!!!!!!!!!

 

.

.

.

좋아요. 이제 기도해봅시다.

i)프로젝트 위치에서 flutter clean   -> flutter pub get

ii)cd ios 한뒤 pod install 입력!

할렐루야~

그럼에도 노란 문구가 또 뜨네요??

 

일단 주어진 문제는 해결했으니 밑에 내용은 추후에 업뎃 할 예정!!

The end

 

---------------------------------------------------

+ 추가로 새로 생긴 노란 문구!!!!! 이를 제대로 해결해봅시다. (점점 에러메세지가 무섭기보단 하나의 퀴즈처럼 느껴진다)

 

[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `Runner` to `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` or include the `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` in your build configuration (`Flutter/Release.xcconfig`).

자 먼저 cocoapods얘기니까 xcode 켤 준비하고,  configuration? 어디서 많이 봤는데?~???~?~

 

찾았다!

네 일단 configuration 찾았고요!

에러메세지는 내가 이미 커스텀 configure을 세팅했다고 하네요!! 디버그 릴리즈 프로파일 이 세가지 한번 자세히 볼까요??

 

좀 힘드네요...

포기하진 말고 담에 이어서 봅시다.

 

다시 왔습니다.

 

[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `Runner` to `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` or include the `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` in your build configuration (`Flutter/Release.xcconfig`).

 

일단 (1)타겟 'Runner'을 'Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig' 으로 바꾸거나 / Target Support Files/Pods-Runner/Pods-Runner.profile.xconfig'(2)build configuration에 포함시키라고 한다..

 

한번 그 경로대로 찾아봤다. 해석은 어렵다.

 .,,,...https://github.com/flutter/flutter/issues/66222. 해결 자체는 너무 쉽게 됐다.

하지만 이 해결책이 저 에러문구를 보는것만으로 연결되지는 않는다. 아직 많이 부족하구나.... 집요하게, 본격적으로, 꾸준하게 공부해보자.

 

------------------------------

<중. 꺽. 마>

https://otrodevym.tistory.com/entry/Flutter-mac-CocoaPods-did-not-set-the-base-configuration-of-your-project-because-your-project-already-has-a-custom-config-set

 

[Flutter-mac] CocoaPods did not set the base configuration of your project because your project already has a custom config set

상황 mac에서 flutter와 xcode를 업그레이드 하고 나서 빌드 에러가 발생했습니다. 문제 파악 "#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"가 누락 되어 있다는 문구를 확인했습니다.

otrodevym.tistory.com

 

맨 마지막 줄에 ('Flutter/Realease.xcconfig')라고 알려줬는데..............

자 거기다가 임포트 해주면 되는것이다.(#include)

 

일단 (1)타겟 'Runner'을 'Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig' 으로 바꾸거나 / Target Support Files/Pods-Runner/Pods-Runner.profile.xconfig' (2)build configuration에 포함시키라고 한다..

 

여기서 2번 방법으로 해결하는것이다 (1번방법은 내가 ios개발자로서 소양이 아직 없다시피하기에 뭔소린지 이해가 안된다).

 

이제 clean하고 pubget하고 ios 경로에서 pod install 하니,,,

 

감사합니다. 오늘도 한층 성장했ㄷr.....