Can't build to iOS , Internal build system error. BuildProgram exited with code 8. Player Build Failed

Include the following details (edit as applicable):

  • Issue category: Unity Example Package / ARDK Virtual Studio Tools / Developer Tools / Building to iOS
  • Device type & OS version: iOS
  • Host machine & OS version: MacBook Air M1 16Gb , Ventura 13.0.1
  • Issue Environment : Unity Mock / Unity Building to iOS
  • Xcode version:
  • ARDK version: 2.3.0
  • Unity version:2022.1.23f1

Description of the issue:

Summary: AR Project using Lightship ARDK does not build to iOS despite every GameObject is disabled.

System: Mac OS Ventura 13.0.1, MacBook Air M1, 16gb RAM.

  1. What is the error?
  2. Exact Error Messages
  3. Project overview & past tries to resolve the issue

What is the error?

Unity Project runs in Editor but does not build to iOS
The error appears in the building process, I get this message first:

“No Adaptive Performance provider package installed. Adaptive Performance requires a provider to get information during runtime. Please install a provider such as Adaptive Performance Samsung (Android) from the Adaptive Performance Settings.”

Exact error messages:

Expanded Error 1

Internal build system error. BuildProgram exited with code 8.
System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at iOSPlayerBuildProgram.SetupTargetForInludedFile(IncludedFile file)
   at iOSPlayerBuildProgram.AddProjectFile(NPath srcPath, NPath dstPath, Boolean addToEmbeddedBinaries, String targetGUID, Boolean shouldAddToProject, SymlinkType symlinkType)
   at iOSPlayerBuildProgram.SetupCopyPlugin(NPath pluginPath, NPath pluginDest, Plugin plugin)+MoveNext()
   at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
   at System.Collections.Generic.List`1.AddRange(IEnumerable`1 collection)
   at PlayerBuildProgramLibrary.PlayerBuildProgramBase.SetupCopyPlugins() in /Users/bokken/build/output/unity/unity/Editor/IncrementalBuildPipeline/PlayerBuildProgramLibrary/PlayerBuildProgramBase.cs:line 537
   at PlayerBuildProgramLibrary.PlayerBuildProgramBase.SetupPlayerBuild() in /Users/bokken/build/output/unity/unity/Editor/IncrementalBuildPipeline/PlayerBuildProgramLibrary/PlayerBuildProgramBase.cs:line 174
   at iOSPlayerBuildProgram.SetupPlayerBuild()
   at PlayerBuildProgramLibrary.PlayerBuildProgramBase.RunBuildProgram() in /Users/bokken/build/output/unity/unity/Editor/IncrementalBuildPipeline/PlayerBuildProgramLibrary/PlayerBuildProgramBase.cs:line 168
   at PlayerBuildProgramTypeWrapper.Run(String[] args)
   at Program.Main(String[] args)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:189)
 Run code snippetExpand snippet```

**Expanded Error 2**
BuildFailedException: Incremental Player build failed!
UnityEditor.Modules.BeeBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/build/output/unity/unity/Editor/Mono/Modules/BeeBuildPostprocessor.cs:663)
UnityEditor.iOS.iOSBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/build/output/unity/unity/PlatformDependent/iPhonePlayer/Extensions/Common/iOSBuildPostprocessor.cs:508)
Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
UnityEditor.iOS.iOSBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/build/output/unity/unity/PlatformDependent/iPhonePlayer/Extensions/Common/iOSBuildPostprocessor.cs:515)
UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at /Users/bokken/build/output/unity/unity/Editor/Mono/Modules/DefaultBuildPostprocessor.cs:28)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.Int32 subtarget, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at /Users/bokken/build/output/unity/unity/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:370)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:189)

**Expanded Error 3:**
Build completed with a result of 'Failed' in 3 seconds (2915 ms)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:189)

**Expanded Error 4:**
UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
  at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002ce] in /Users/bokken/build/output/unity/unity/Editor/Mono/BuildPlayerWindowBuildMethods.cs:193 
  at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in /Users/bokken/build/output/unity/unity/Editor/Mono/BuildPlayerWindowBuildMethods.cs:94 
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:189)


Project Overview, tries to resolve

The project is an AR App that allows you to control a butterfly, by placing cube. He will fly to one cube after another. (Would love to share a screenshot but not allowed).

Tries to resolve the issue:

Deactive all Game Objects except the camera, build to iOS → Does not work

Deactivate all Game Objects (Empty Scene), build to iOS → not working.

Create a new Unity Project using a empty 3D scene, build to iOS → Works

Create a new Unity Project using ARDK, build to iOS → Works

One more thought: I am using iCloud Drive, maybe it uploaded something and deleted the local copy?

Hope someone can help :slight_smile: Thanks a lot in advance.

1 Like

I’d suggest deleting the library folder to reimport the project. Also make sure you don’t import the arkit/arfoundation/arcore packages in unity, since ardk has it’s own versions.

Note that 2022 isn’t officially supported

1 Like

Hello @Tobias_Reidl,

The Adaptive Performance package is a package provided by Unity that is not required to build AR apps with Lightship. It’s my understanding that it contains functionality that allows for dynamically setting your app’s quality settings depending on the state of the device – i.e., if the device is overheating, the Adaptive Performance package is intended to respond to that by reducing quality settings in order to improve overall performance. However, it appears that this package only supports some Samsung device models at this time.

If you do not require this functionality in your app, then we recommend that you remove it from the list of installed packages by navigating to Window > Package Manager and removing Adaptive Performance from the list of installed packages. If you’d like to include this package instead, then you may need to install the Adaptive Performance Samsung Android sub-package in order to complete the installation of the overall Adaptive Performance package. The official documentation for the Adaptive Performance package can be found in the Unity documentation here.

If you’ve decided to remove the package from your project, you may want to restart Unity before attempting a new build.

Let us know if this helps resolve your issue!

1 Like

Thank you , I already created a completely new project and reimported my assets and scripts and no adaptive performance. So far everything works. Thank you :slight_smile:

1 Like

Hi guys, sadly I experience this issue again with the exact same error code as below. I tried to disable LightShip but it did not make a difference. Building to Windows / MAC / Linux does work.

Grateful for any kind of advice!

Did not work sadly. I think it’s not a lightship but a iOS issue. Deactivating Lightship does not change anything, however I can build to Mac / PC no problem

Start with a blank project and add stuff till it breaks

yeah did create a new project and so far everything seems fine. It’S however the second time I had so start from scratch which is a bit annoying. Thank you mate :slight_smile:

You can make packages of your scene to port all the gameplay or almost all

1 Like

that a good advice mate thanks :slight_smile: