๐ŸŽฎ Unity Study/ERROR Q&A

[Unity Build Error&Solution] iOS build error(feat. Facebook SDK 9.0)

ibelieveinme 2022. 2. 21. 17:14
728x90

Facebook SDK 9.0 ์„ ์‚ฌ์šฉํ•˜๋Š” Unity Project(2020.1.0f)๋ฅผ iOS ๋นŒ๋“œ ํ•˜๋˜ ์ค‘ ๋งŒ๋‚œ ์—๋Ÿฌ...

Exception: Calling TargetGuidByName with name='Unity-iPhone' is deprecated.
There are two targets now, call GetUnityMainTargetGuid() - for app or GetUnityFrameworkTargetGuid() - for source/plugins to get Guid instead.

UnityEditor.iOS.Xcode.PBXProject.TargetGuidByName (System.String name) (at /Users/builduser/buildslave/unity/build/External/XcodeAPI/Xcode/PBXProject.cs:172)
XcodeOption.OnPostProcessBuild (UnityEditor.BuildTarget buildTarget, System.String path) (at Assets/Editor/XcodeOption.cs:20)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <fb001e01371b4adca20013e0ac763896>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <fb001e01371b4adca20013e0ac763896>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <fb001e01371b4adca20013e0ac763896>:0)
UnityEditor.Build.BuildPipelineInterfaces+AttributeCallbackWrapper.OnPostprocessBuild (UnityEditor.Build.Reporting.BuildReport report) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:177)
UnityEditor.Build.BuildPipelineInterfaces+<>c__DisplayClass17_0.<OnBuildPostProcess>b__1 (UnityEditor.Build.IPostprocessBuildWithReport bpp) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:433)
UnityEditor.Build.BuildPipelineInterfaces.InvokeCallbackInterfacesPair[T1,T2] (System.Collections.Generic.List`1[T] oneInterfaces, System.Action`1[T] invocationOne, System.Collections.Generic.List`1[T] twoInterfaces, System.Action`1[T] invocationTwo, System.Boolean exitOnFailure) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:391)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)

์นœ์ ˆํ•˜๊ฒŒ ์˜ค๋ฅ˜ ํ•ด๊ฒฐ๋ฒ•์„ ์•Œ๋ ค์คฌ๊ตฐ...

 

 

ํ•ด๊ฒฐ์ฑ…

Unity 2019.3๋ถ€ํ„ฐ iOS ๋นŒ๋“œ ์‹œ, TargetGuidByName("Unity-iPhone") ๊ตฌ๋ฌธ ๋Œ€์‹ ์— GetUnityFrameworkTargetGuid()๋‚˜ GetUnityMainTargetGuid() ๋ฅผ ์‚ฌ์šฉํ•ด์•ผ ํ•œ๋‹ค๊ณ  ํ•œ๋‹ค. ์ฆ‰, Xcode Project๋ฅผ ์ƒ์„ฑํ•˜๋Š” ๊ธฐ์กด์ฝ”๋“œ๋ฅผ ์‚ฌ์šฉํ•˜๋˜ ์ค‘์— Unity Version ์„ ์˜ฌ๋ ค์„œ ์—๋Ÿฌ๊ฐ€ ๋‚œ ๊ฒƒ..!

 

Unity Xcode ํ”„๋กœ์ ํŠธ ๊ตฌ์กฐ - Unity ๋งค๋‰ด์–ผ

iOS ํ”Œ๋žซํผ์šฉ Unity ํ”„๋กœ์ ํŠธ๋ฅผ ๋นŒ๋“œํ•˜๋Š” ๊ฒฝ์šฐ Unity๋Š” Xcode ํ”„๋กœ์ ํŠธ๊ฐ€ ํฌํ•จ๋œ ํด๋”๋ฅผ ๋งŒ๋“ญ๋‹ˆ๋‹ค. ์ด ํ”„๋กœ์ ํŠธ๋Š” ์•ฑ์„ ๊ธฐ๊ธฐ์— ๋ฐฐํฌํ•˜๊ธฐ ์ „์— ์ปดํŒŒ์ผํ•˜๊ณ  ์„œ๋ช…ํ•˜๋Š” ๋ฐ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. ๋˜ํ•œ App Store์— ๊ฒŒ

docs.unity3d.com

์œ„ ๋ฌธ์„œ ๋ ์ฏ”์Œ์— ์•„๋ž˜์™€ ๊ฐ™์€ ๋ง์ด ๋‚˜์˜จ๋‹น. ์ฐธ๊ณ ์ฐธ๊ณ ~

 

Unity 2019.3๋ถ€ํ„ฐ PBXProject.GetUnityTargetName์™€ pbxProject->TargetGuidByName("Unity-iPhone")์„ ๋” ์ด์ƒ ์‚ฌ์šฉํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ๋Œ€์‹  pbxProject->GetUnityFrameworkTargetGuid(), ๋˜๋Š” pbxProject->GetUnityMainTargetGuid()๋ฅผ ์‚ฌ์šฉํ•˜์‹ญ์‹œ์˜ค.

 

 

๋‚˜์˜ ๊ฒฝ์šฐ์—๋Š” Assets>Editor>XcodeOption.cs ํŒŒ์ผ์—์„œ pbxProject.TargetGuidByName("Unity-iPhone")๋ถ€๋ถ„์„  pbxProject.GetUnityFrameworkTargetGuid() ๋กœ ๋ฐ”๊ฟ”์คฌ๋‹ค. 

์ˆ˜์ • ์ „
์ˆ˜์ • ํ›„

 
 
๋นŒ๋“œ ์„ฑ๊ณต. ํ‡ด๊ทผ๊บ„~

 

728x90