[빌드에러] (Xcode 14): Signing for "GoogleSignIn-GoogleSignIn" requires a development team.
Unity3D/iOS / 2022. 11. 18. 15:15
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 댓글
- 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 댓글
반응형
'Unity3D > iOS' 카테고리의 다른 글
[Xcode] PostProcessBuild(with FixPodFile) (0) | 2022.12.11 |
---|---|
[펌] UnityEngine.Videoplayer not rendering video on IOS Devices (0) | 2022.11.25 |
[펌] PostProcessBuild에서 PodFile 수정 방법 (0) | 2022.11.18 |
[펌] [Xcode] Set 'Always Embed Swift Standard Libraries' in PostProcess (0) | 2022.11.17 |
[펌] ITMS-90427: Invalid Swift Support (0) | 2022.11.16 |