Unable to build with ARKit after Xcode update

I updated my macOS to Sonoma 14.0, which required Xcode update to version 15.0.
After updating to this version, I am no longer able to build my Unity app when Apple ARKit is enabled as a plug-in provider in Project Settings.
The build fails after 1-2 seconds and I’m getting this error:

ExecutionFailedException: Execution of actool failed with exit code 1. stderr:
UnityEditor.XR.ARKit.ACTool.Compile (System.String assetCatalogPath, System.String outputDirectory, System.Version minimumDeploymentTarget) (at ./Library/PackageCache/com.unity.xr.arkit@5.0.7/Editor/ACTool.cs:67)
UnityEditor.XR.ARKit.XcodeAssetCatalog.ToCar (System.Version minimumDeploymentTarget) (at ./Library/PackageCache/com.unity.xr.arkit@5.0.7/Editor/XcodeAssetCatalog.cs:89)
UnityEditor.XR.ARKit.ARResourceGroup.ToCar (System.Version minimumDeploymentTarget) (at ./Library/PackageCache/com.unity.xr.arkit@5.0.7/Editor/ARResourceGroup.cs:21)
UnityEditor.XR.ARKit.ARKitReferenceImageLibraryBuildProcessor+Preprocessor.BuildAssets () (at ./Library/PackageCache/com.unity.xr.arkit@5.0.7/Editor/ARKitReferenceImageLibraryBuildProcessor.cs:103)
UnityEditor.XR.ARKit.ARKitReferenceImageLibraryBuildProcessor+Preprocessor.UnityEditor.Build.IPreprocessBuildWithReport.OnPreprocessBuild (UnityEditor.Build.Reporting.BuildReport report) (at ./Library/PackageCache/com.unity.xr.arkit@5.0.7/Editor/ARKitReferenceImageLibraryBuildProcessor.cs:121)
UnityEditor.Build.BuildPipelineInterfaces+<>c__DisplayClass16_0.b__1 (UnityEditor.Build.IPreprocessBuildWithReport bpp) (at /Users/bokken/build/output/unity/unity/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:499)
UnityEditor.Build.BuildPipelineInterfaces.InvokeCallbackInterfacesPair[T1,T2] (System.Collections.Generic.List1[T] oneInterfaces, System.Action1[T] invocationOne, System.Collections.Generic.List1[T] twoInterfaces, System.Action1[T] invocationTwo, System.Boolean exitOnFailure) (at /Users/bokken/build/output/unity/unity/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:465)
UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:190)

If I disable ARKit as a plug-in provider, the build starts to work, but that’s not a solution for me.
I tried reinstalling Xcode and command line tools but that didn’t help. This doesn’t work in the ARFoundation sample repository (Unity 2022.3.10f1) as well.

Me too. I have upgraded to Unity 2022.3.11f1, but no success. Same error Xcode is not even opening.

As a workaround it does work if you do not use “Build and Run” but “Build” instead, and open it with Xcode 15 afterwards. I used Unity 2022.3.11f1 and AR Foundation 5.1.

I resolved the issue by installing the iOS 17.0 simulator through Xcode. While I was in the process of debugging the UnityEditor.XR.ARKit.ACTool.Compile() method, I noticed a brief message in some variable referring to a “missing device emulator.” Strangely, this message wasn’t displayed in the Unity Editor, which made the troubleshooting process quite challenging.

Make sure you’ve installed the command line tools for Xcode. This is how you’d normally get the actool.

I updated the Xcode to 15.3, macOS to 14.4, and iOS to 17.4.
And then this error happened when building a new Unity Project.

  • I just opened Xcode and random Xcode project
  • Attached iPhone via USB. Xcode suggested me to install iOS Simulator 17.0. I installed it.
  • I Built Project from Unity without any error. No command line tools for Xcode needed.

The AR Foundation Samples found here: GitHub - Unity-Technologies/arfoundation-samples: Example content for Unity projects based on AR Foundation
… do not exhibit this problem when built for ARKit with MacOS 14.4, XCode 15.2, and connected to an iOS 17.3 device.

I would recommend using that project as a point of reference to help isolate where the problem might be if you are still having this build issue.