ARFoundation on iOS issues

Hi guys,

I’m trying to get a simple sample of ARFoundation running on our iPhone but can’t seem to get it working. I’ve followed this example with just a cube and the bare ARFoundation objects needed:

After running on the iPhone the screen stays black and after a few seconds the app crashes. On Android all this works fine.

Here is my current setup:
– Unity 2019.2.9f1
– MacOS Catalina 10.15
– XCode 11.1
– iPhone Xr
– ARFoundation/ARKit XR Plugin 2.0.2 (and 3.0 preview 3 and 4).

I’ve also tried to run the arfoundation-samples from GitHub and that also failed, with a pink background (shader issues I guess) and then a crash.

Here is the output when I run it attached to my iPhone:

2019-10-24 11:44:15.458264-0700 ARTest1[6414:93053] Built from ‘2019.2/staging’ branch, Version ‘2019.2.9f1 (ebce4d76e6e8)’, Build type ‘Release’, Scripting Backend ‘il2cpp’
2019-10-24 11:44:15.469514-0700 ARTest1[6414:93053] → registered mono modules 0x103bef560
→ applicationDidFinishLaunching()
2019-10-24 11:44:15.540433-0700 ARTest1[6414:93053] Metal GPU Frame Capture Enabled
→ applicationDidBecomeActive()
[XR] Discovering subsystems at path /private/var/containers/Bundle/Application/A1F5AAE5-77DB-49BB-92AA-BB5CD696C5FE/ARTest1.app/Data/UnitySubsystems
[XR] No descriptors matched for examples in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json.
[XR] 1 ‘inputs’ descriptors matched in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json
[XR] No descriptors matched for cameras in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json.
[XR] No descriptors matched for displays in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json.
[XR] No descriptors matched for depths in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json.
[XR] No descriptors matched for meshings in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json.
[XR] No descriptors matched for planes in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json.
[XR] No descriptors matched for raycasts in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json.
[XR] No descriptors matched for referencePoints in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json.
[XR] No descriptors matched for sessions in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json.
[XR] No descriptors matched for experience in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json.
[XR] No descriptors matched for gestures in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json.
GfxDevice: creating device client; threaded=1
Initializing Metal device caps: Apple A12 GPU
Initialize engine version: 2019.2.9f1 (ebce4d76e6e8)
WARNING: Shader Unsupported: ‘Hidden/Internal-GUITexture’ - Pass ‘’ has no vertex shader
2019-10-24 11:44:17.048519-0700 ARTest1[6414:93369] Compiler failed with XPC_ERROR_CONNECTION_INTERRUPTED
Failed to find expected binary shader data in ‘Standard’.
(Filename: ./Runtime/Shaders/SerializedShader.cpp Line: 595)
Failed to find expected binary shader data in ‘Standard’.
(Filename: ./Runtime/Shaders/SerializedShader.cpp Line: 595)
Failed to find expected binary shader data in ‘Standard’.
(Filename: ./Runtime/Shaders/SerializedShader.cpp Line: 595)
Failed to find expected binary shader data in ‘Standard’.
(Filename: ./Runtime/Shaders/SerializedShader.cpp Line: 595)
Failed to find expected binary shader data in ‘Standard’.
(Filename: ./Runtime/Shaders/SerializedShader.cpp Line: 595)
Failed to find expected binary shader data in ‘Standard’.
(Filename: ./Runtime/Shaders/SerializedShader.cpp Line: 595)
Failed to find expected binary shader data in ‘Standard’.
(Filename: ./Runtime/Shaders/SerializedShader.cpp Line: 595)
Failed to find expected binary shader data in ‘Standard’.
(Filename: ./Runtime/Shaders/SerializedShader.cpp Line: 595)
Failed to find expected binary shader data in ‘Legacy Shaders/VertexLit’.
(Filename: ./Runtime/Shaders/SerializedShader.cpp Line: 595)
Failed to find expected binary shader data in ‘Legacy Shaders/VertexLit’.
(Filename: ./Runtime/Shaders/SerializedShader.cpp Line: 595)
WARNING: Shader Unsupported: ‘Legacy Shaders/VertexLit’ - Pass ‘’ has no vertex shader
ERROR: Shader Shader is not supported on this GPU (none of subshaders/fallbacks are suitable)WARNING: Shader Unsupported: ‘Legacy Shaders/VertexLit’ - Setting to default shader.
WARNING: Shader Unsupported: ‘Standard’ - Pass ‘ShadowCaster’ has no fragment shader
Failed to find expected binary shader data in ‘Skybox/Procedural’.
(Filename: ./Runtime/Shaders/SerializedShader.cpp Line: 595)
Failed to find expected binary shader data in ‘Skybox/Procedural’.
(Filename: ./Runtime/Shaders/SerializedShader.cpp Line: 595)
Failed to find expected binary shader data in ‘Skybox/Procedural’.
(Filename: ./Runtime/Shaders/SerializedShader.cpp Line: 595)
2019-10-24 11:44:17.060705-0700 ARTest1[6414:93369] Compiler failed with XPC_ERROR_CONNECTION_INTERRUPTED
2019-10-24 11:44:17.070337-0700 ARTest1[6414:93369] Compiler failed with XPC_ERROR_CONNECTION_INTERRUPTED
2019-10-24 11:44:17.070398-0700 ARTest1[6414:93369] MTLCompiler: Compilation failed with XPC_ERROR_CONNECTION_INTERRUPTED on 3 try
Metal: Error creating pipeline state (Hidden/Internal-GUITexture): Compiler encountered an internal error
(null)2019-10-24 11:44:27.152031-0700 ARTest1[6414:93369] Compiler failed with XPC_ERROR_CONNECTION_INTERRUPTED
2019-10-24 11:44:37.194494-0700 ARTest1[6414:93369] Compiler failed with XPC_ERROR_CONNECTION_INTERRUPTED
2019-10-24 11:44:47.236081-0700 ARTest1[6414:93369] Compiler failed with XPC_ERROR_CONNECTION_INTERRUPTED
2019-10-24 11:44:47.236335-0700 ARTest1[6414:93369] MTLCompiler: Compilation failed with XPC_ERROR_CONNECTION_INTERRUPTED on 3 try
Metal: Error creating pipeline state (Sprites/Default): Compiler encountered an internal error
(null)2019-10-24 11:44:47.280529-0700 ARTest1[6414:93053] [Common] _BSMachError: port 15203; (os/kern) invalid capability (0x14) “Unable to insert COPY_SEND”
2019-10-24 11:44:47.281460-0700 ARTest1[6414:93053] Unbalanced calls to begin/end appearance transitions for <SplashScreenController: 0x12da01ac0>.
UnloadTime: 0.306792 ms
[XR] Loading plugin UnityARKit for subsystem ARKit-Input…
[XR] UnityARKit successfully registered Provider for ARKit-Input
WARNING: Shader Unsupported: ‘Unlit/ARKit’ - Pass ‘’ has no vertex shader
ERROR: Shader Shader is not supported on this GPU (none of subshaders/fallbacks are suitable)WARNING: Shader Unsupported: ‘Unlit/ARKit’ - Setting to default shader.
WARNING: Shader Unsupported: ‘Hidden/BlitCopy’ - Pass ‘’ has no vertex shader
WARNING: Shader Unsupported: ‘Hidden/BlitCopy’ - Setting to default shader.
2019-10-24 11:44:55.626679-0700 ARTest1[6414:93663] XPC connection interrupted
ARTest1 was compiled with optimization - stepping may behave oddly; variables may not be available.

And finally, this is where it crashes:
UnityGfxDeviceWorker (36): EXC_BAD_ACCESS (code=1, address=0xb4037101d7e13870)

If anyone has a clue what’s going on I’d appreciate some info. Running out of ideas here, aside from maybe some bad hardware or the versions of the AR pieces and iOS don’t work together.

Thanks!


I have the same issue. Works on Android and not iOS. For some reason the shaders do not compile when building for iOS.

I am having the exact same problem. Android build is fine but for iOS I am getting:
Failed to find expected binary shader data in ‘Standard’.
(Filename: ./Runtime/Shaders/SerializedShader.cpp Line: 595)

If I change color space to Linear from Gamma it works fine.

Had the same issue and this did not work for me. We do have a lot of custom shaders, so that might be the issue at hand.

It’s an issue with the shader compiler on Catalina, MushDevStudio already found the bug on the Unity Issue Tracker:
https://issuetracker.unity3d.com/issues/ios?_ga=2.42385061.1412129407.1572251278-1740351432.1547632638

I use the 2019.3 beta of Unity, which solved the issue for me, but I can imagine that might not be the best way for you. There are a couple of workarounds in the comments on the issue tracker. Or perhaps switching the color space works for you as well.

Thanks TalespinJoe - I have now updated to 2019.2.11f1 and now it is working perfect with Gamma color space.

The issue persists in 2019.2.12

1 Like

I had the same problem, after trying a few tests, disable and enabling the graphics options and installing and uninstalling software versions for iOS, I got a solution without the need to switch the Color Space rending to Linear. Leaving the default settings (Gamma color space). I notice that when I create a new project, the “Auto Graphics API” checkbox is enabled, so after disabling this I resolve my issue of the pink screen.

TL;DR
Have you tried to disable the “Auto Graphics API” checkbox?

Disabling “Auto Graphics API” had no effect for me.
Does the iPhone model matter? I’m running an 8+.

Edit:
Using 2019.2 and disabling Auto Graphics API and changing Color Space to Linear finally worked. Still getting several errors in XCode, but at least I can continue development.

Upgrading to 2019.3b and turning on Auto Graphics API and changing Color Space to Gamma also worked.

Thanks @TolchinJ , your suggestion…“Upgrading to 2019.3b and turning on Auto Graphics API and changing Color Space to Gamma also worked.” fixed the problem that I was having. I greatly appreciate your posting it!