[XCode] [!] Cocoapods could not find compatible versions for pod "GTMSessionFetcher/Core"
Unity 2021.3.16f1
Xcode 14.2
Firebase 10.4.0
----
[빌드 에러]
pod install output:
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "GTMSessionFetcher/Core":
In Podfile:
Firebase/Auth (= 10.6.0) was resolved to 10.6.0, which depends on
FirebaseAuth (~> 10.6.0) was resolved to 10.6.0, which depends on
GTMSessionFetcher/Core (< 4.0, >= 2.1)
GoogleSignIn (= 6.0.2) was resolved to 6.0.2, which depends on
GTMAppAuth (~> 1.0) was resolved to 1.3.1, which depends on
GTMSessionFetcher/Core (< 3.0, >= 1.5)
GoogleSignIn (= 6.0.2) was resolved to 6.0.2, which depends on
GTMSessionFetcher/Core (~> 1.1)
Firebase 10.6.0이 업데이트 돼서 다시 한 번 iOS 빌드를 시도해 봤는데 여전히 에러가 난다.
(참조 : https://blueasa.tistory.com/2706)
그래도 다시 이리저리 검색해보다보니 해결했다는 글이 아래와 같이 있다.
UnayOzan commented on Feb 5
Fixed this error with changing the version in "GoogleSignIn.podspec.json" file.
Firebase/Auth (= 10.4.0) was resolved to 10.4.0, which depends on
FirebaseAuth (~> 10.4.0) was resolved to 10.4.0, which depends on
GTMSessionFetcher/Core (< 4.0, >= 2.1)
GoogleSignIn (~> **5.0.2**) was resolved to **5.0.2**, which depends on
GTMSessionFetcher/Core (~> **1.1**)
I found the file in {user}.cocoapods/repos/cocoapods/Specs and then just search for "GoogleSignIn.podspec.json".
Find the folder with the same version with the error, in my case 5.0.2.
And then change its dependencies with the version 7.0.0 or something that works with the other packages.
In my project the solution was this;
"dependencies": {
"AppAuth": [
"~> 1.5"
],
"GTMAppAuth": [
">= 1.3",
"< 3.0"
],
"GTMSessionFetcher/Core": [
">= 1.1",
"< 4.0"
]
After that I exited Xcode, deintagrated pods, cleaned cache and installed it again.
Everything works fine now.
[링크] https://github.com/firebase/firebase-unity-sdk/issues/621
글을 보면 아래와 같은 내용이 있다.
And then change its dependencies with the version 7.0.0 or something that works with the other packages.
In my project the solution was this;
에러도 나와 거의 같아서 확인해보니 GoogleSignIn 버전이 현재 6.0.2여서 GTMSessionFetcher/Core (~> 1.1)를 지원하는데,
설치한 FirebaseAuth 10.6.0은 GTMSessionFetcher/Core (< 4.0, >= 2.1)을 사용하고 있어서
GTMSessionFetcher/Core 버전이 서로 호환이 안되는 것 같다.
위 링크의 내용대로
GoogleSignIn 버전을 7.0.0(2023-03-27 기준 최신) 버전으로 변경하고 빌드를 다시해보니 깔끔하게 빌드가 잘 된다.
[추가]
빌드는 잘 되는데 회사 플랫폼에서 사용하는 GoogleSignIn이 6.0.2여서 7.0.0으로 올리면서 API 호환이 안돼서 로그인 시도할 때 Crash가 나면서 앱이 강제종료 된다.
6.2.4
2.x 버전을 허용하도록 GTMSessionFetcher 종속 항목을 업데이트했습니다. (#207)
GoogleSignIn에서 해당 빌드 오류 이슈를 해결한 버전은 6.2.4여서 6.2.4로 버전을 내렸다.
나처럼 다른 이슈로 7.0.0으로 못올리는 사람은 6.2.4로 한 번 시도해 보면 좋을 것 같다.
[GoogleSignIn 버전 참조] https://developers.google.com/identity/sign-in/ios/release?hl=ko