블로그 이미지
Every unexpected event is a path to learning for you.

카테고리

분류 전체보기 (2737)
Unity3D (817)
Programming (474)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (228)
협업 (58)
3DS Max (3)
Game (12)
Utility (136)
Etc (96)
Link (32)
Portfolio (19)
Subject (90)
iOS,OSX (53)
Android (14)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (3)
Memories (20)
Interest (38)
Thinking (38)
한글 (30)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (18)
Exercise (3)
나만의 맛집 (3)
냥이 (10)
육아 (16)
Total
Today
Yesterday
04-20 00:00

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)

 

[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.4.0) was resolved to 10.4.0, whic

blueasa.tistory.com

 

그래도 다시 이리저리 검색해보다보니 해결했다는 글이 아래와 같이 있다.

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

 

[Bug] FirebaseAuth and GoogleSignIn iOS Build failure · Issue #621 · firebase/firebase-unity-sdk

[REQUIRED] Please fill in the following fields: Unity editor version: 2021.3.17f1 Firebase Unity SDK version: 10.4.0 Source you installed the SDK: .unitypackage Problematic Firebase Component: Auth...

github.com

 

글을 보면 아래와 같은 내용이 있다.

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

 

Google 로그인 iOS 및 macOS SDK 출시 노트  |  Authentication  |  Google Developers

이 페이지는 Cloud Translation API를 통해 번역되었습니다. Switch to English 의견 보내기 Google 로그인 iOS 및 macOS SDK 출시 노트 컬렉션을 사용해 정리하기 내 환경설정을 기준으로 콘텐츠를 저장하고 분

developers.google.com

 

반응형
Posted by blueasa
, |

Unity2020.3.40f1

Xcode 14.1

 

Xcode 14로 업데이트 후, iOS 빌드 하면 제목과 같은 에러가 발생한다.

 

- 관련 에러 위치 찾아가서 Team Id를 선택하면 잘되긴 하는데, 빌드때마다 수동으로 하기는 애매해서 찾아보니 PodFile에 아래 내용을 추가하면 된다고 한다.

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"
      target.build_configurations.each do |config|
        config.build_settings['CODE_SIGN_IDENTITY'] = ""
        #prevent resource bundle from reading image nil
        config.build_settings.delete('PRODUCT_BUNDLE_IDENTIFIER')
      end
    end
  end
end

[출처] https://github.com/CocoaPods/CocoaPods/issues/11402 : JosephPoplar 댓글

 

Xcode 14 build failed with manual code sign and app resource bundles · Issue #11402 · CocoaPods/CocoaPods

I've read and understood the CONTRIBUTING guidelines and have done my best effort to follow. Report What did you do? Integrate a pod with resource bundle. Set app code sign style to Manual. Bui...

github.com

 

 

- iOS 빌드해서 PodFile 수작업을 계속할 수는 없는지라  Unity의 Xcode PostProcessBuild에서 자동으로 추가하도록 함.

(Define을 봐서는 Unity2019.3 이상에서만 가능한 것 같다)

#if UNITY_2019_3_OR_NEWER
        // FixPodFile 사용법 참조
        // https://github.com/googlesamples/unity-jar-resolver/issues/405 : Str4tos 댓글
        [PostProcessBuild(45)]//must be between 40 and 50 to ensure that it's not overriden by Podfile generation (40) and that it's added before "pod install" (50)
        private static void FixPodFile(BuildTarget buildTarget, string buildPath)
        {
            /// Stop processing if target is NOT iOS
            if (buildTarget != BuildTarget.iOS)
                return;

            using (StreamWriter sw = File.AppendText(buildPath + "/Podfile"))
            {
                // [Error 대응] (Xcode 14): Signing for "GoogleSignIn-GoogleSignIn" requires a development team.
                // [해결방법 참조] https://github.com/CocoaPods/CocoaPods/issues/11402 : JosephPoplar 댓글
                sw.WriteLine("\npost_install do |installer|\n  installer.pods_project.targets.each do |target|\n    if target.respond_to?(:product_type) and target.product_type == \"com.apple.product-type.bundle\"\n      target.build_configurations.each do |config|\n        config.build_settings['CODE_SIGN_IDENTITY'] = \"\"\n        #prevent resource bundle from reading image nil\n        config.build_settings.delete('PRODUCT_BUNDLE_IDENTIFIER')\n      end\n    end\n  end\nend");

                /// ex
                //sw.WriteLine("\ntarget 'Unity-iPhone' do\nend");
            }
        }
#endif

[출처] https://github.com/googlesamples/unity-jar-resolver/issues/405 : Str4tos 댓글

 

iOS Unity 2019.4 and UnityFramework pod target error · Issue #405 · googlesamples/unity-jar-resolver

[REQUIRED] Please fill in the following fields: Unity editor version: 2019.4.11f1, 2020.1.7f1 External Dependency Manager version: v1.2.159 Source you installed EDM4U: Unity Package Manager Feature...

github.com

 

반응형
Posted by blueasa
, |