Search Issue Tracker

Fixed in 3.1.1

Votes

5

Found in [Package]

2.0.8

Issue ID

1154001

Regression

Yes

[iOS] Build and run fails on mac for iOS with the default ads package

Package: Ads

-

[iOS] Build and run fails on mac for iOS

Steps To Reproduce:

1. Create a project
2. Switch platform to iOS
3. Player Settings > Team ID > Enter a Valid Team ID
4. Build Settings > Build and Run

Expected Result: Builds successfully and runs on the connected iOS device

Observed Result: Build fails with errors in the console

Workaround: Works fine on upgrading the ad package to 3.0.2 or higher

Reproducible On: 2019.3.0.a2

Not Reproducible On: 2019.3.0a1

Stack Trace:

1.UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00242] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:190
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x0007f] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:95
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
2. Error building Player: 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.
3. 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:168)
UnityEditorInternal.Advertisements.UnityAdsPostprocessor.EditXcodeProject (System.String buildFolder) (at /home/builduser/buildslave/com.unity.ads/package/Source/UnityAdsEditor/UnityAdsPostprocessor.cs:101)
UnityEditorInternal.Advertisements.UnityAdsPostprocessor.PostProcessBuild_iOS (UnityEditor.BuildTarget target, System.String path) (at /home/builduser/buildslave/com.unity.ads/package/Source/UnityAdsEditor/UnityAdsPostprocessor.cs:92)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <23c160f925be47d7a4fd083a3a62c920>: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 <23c160f925be47d7a4fd083a3a62c920>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <23c160f925be47d7a4fd083a3a62c920>:0)
UnityEditor.Build.BuildPipelineInterfaces+AttributeCallbackWrapper.OnPostprocessBuild (UnityEditor.Build.Reporting.BuildReport report) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:158)
UnityEditor.Build.BuildPipelineInterfaces+<OnBuildPostProcess>c__AnonStorey2.<>m__1 (UnityEditor.Build.IPostprocessBuildWithReport bpp) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:398)
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:356)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Environment: Occurs only on Mac

Comments (14)

  1. Fillmore

    Jun 07, 2019 20:39

    Got this today directly after updating Unity and attempting a first build to a new xcode location.

  2. UniBitDeveloper

    Jun 06, 2019 15:39

    reproduced at 2019.3.0a3
    http://prntscr.com/nygug5

  3. mumoryan

    Jun 03, 2019 02:32

    Worked for me too. Note the name of the Ads package will change to Advertisement after upgrade

  4. nixedd

    May 23, 2019 20:01

    Thank you! Had the same issue and updating the Ads package worked for me too :-)

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.