Linking Errors Building For iOS. All latest versions.

I had no issues building for ARKit preview 12. With preview 13 I get the following linking errors:

Undefined symbols for architecture arm64:

“_UnityARKit_getAnchorTrackingState”, referenced from:

_ARKitPlaneExtensions_GetTrackingState_m2048017765 in Bulk_Unity.XR.ARKit_0.o

_Api_UnityARKit_getAnchorTrackingState_m2010225283 in Bulk_Unity.XR.ARKit_0.o

(maybe you meant: _Api_UnityARKit_getAnchorTrackingState_m2010225283)

ld: symbol(s) not found for architecture arm64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

UnityARKit_getAnchorTrackingState was added around that time. Sounds like you’ve got some stale build artifacts. Try deleting the trampoline Xcode project and your Unity project’s Library folder and try again.

Ok I can get it to build however when I try to archive it gives me different linker errors:

Undefined symbols for architecture armv7:

“_UnityPluginLoad”, referenced from:

+[UnityARKit loadPlugin] in UnityARKit.o

“_UnityARKit_attachReferencePoint”, referenced from:

_ARKitReferencePointExtensions_AttachReferencePoint_m1545289816 in Bulk_Unity.XR.ARKit_0.o

_Api_UnityARKit_attachReferencePoint_m3116019577 in Bulk_Unity.XR.ARKit_0.o

(maybe you meant: _Api_UnityARKit_attachReferencePoint_m3116019577)

“_UnityARKit_CheckAvailability”, referenced from:

_ARKitSessionExtension_GetAvailabilityAsync_m410615261 in Bulk_Unity.XR.ARKit_0.o

_Api_UnityARKit_CheckAvailability_m3120799004 in Bulk_Unity.XR.ARKit_0.o

(maybe you meant: _Api_UnityARKit_CheckAvailability_m3120799004)

“_UnityARKit_IsCameraPermissionGranted”, referenced from:

_ARKitCameraExtension_IsPermissionGranted_m2169676259 in Bulk_Unity.XR.ARKit_0.o

_Api_UnityARKit_IsCameraPermissionGranted_m2819318200 in Bulk_Unity.XR.ARKit_0.o

(maybe you meant: _Api_UnityARKit_IsCameraPermissionGranted_m2819318200)

“_SetupiOS”, referenced from:

+[UnityARKit loadPlugin] in UnityARKit.o

“_UnityARKit_getAnchorTrackingState”, referenced from:

_ARKitPlaneExtensions_GetTrackingState_m2048017765 in Bulk_Unity.XR.ARKit_0.o

_Api_UnityARKit_getAnchorTrackingState_m2010225283 in Bulk_Unity.XR.ARKit_0.o

(maybe you meant: _Api_UnityARKit_getAnchorTrackingState_m2010225283)

ld: symbol(s) not found for architecture armv7

clang: error: linker command failed with exit code 1 (use -v to see invocation)

I also get warnings in Unity:
Removing Packages/com.unity.xr.arkit/npm-debug.log because the asset does not exist
GUID [dbca4b5d18c5b4a59ad11c981347242d] for asset ‘Packages/com.unity.xr.arkit/Runtime/iOS/UnityARKit.a’ conflicts with:
‘/Users/MyComputer/Library/Unity/cache/packages/packages.unity.com/com.unity.xr.arkit@1.0.0-preview.13/Runtime/iOS/UnityARKit.a’ (current owner)
We can’t assign a new GUID because the asset is in an immutable folder. The asset will be ignored.

We don’t build the ARKit plugin for armv7, so you won’t be able to create an armv7 archive that links against it. We only support arm64. Try removing the armv7 target from your archive.

This message is harmless. The warning will be removed in a future release of Unity.

3 Likes

Thanks Timmunity. That worked. Any idea why a game sometimes becomes unresponsive? It doesn’t crash and Xcode shows it’s still running, however nothing is happening on screen and the UI is unresponsive.

Sounds like a hang. Can you reproduce it consistently?

It happens randomly. Sometimes within a few seconds after start, other times after 20 minutes. It happens in 2 projects of mine. The only thing they have in common is AR so I thought there might be a connection.

If I pause Xcode I get this output:

libsystem_kernel.dylib`semaphore_wait_trap:

0x182fe3e1c <+0>: mov x16, #-0x24

0x182fe3e20 <+4>: svc #0x80

→ 0x182fe3e24 <+8>: ret

Here’s the stack trace:

3589740--290700--Screen Shot 2018-08-07 at 9.39.34 PM.png

I’ve been looking into this. It seems to be a legit issue on our side, but I’ve also found I can’t reproduce it if I set the target frame rate to 60 (which is recommended for iOS anyway). I don’t think we do that in our sample app.

Could you try setting the target frame rate to 60 and see if that helps?

Also, track this issue here: https://issuetracker.unity3d.com/issues/hang-on-ios-using-arkit-xr-plugin

Hi. Is there an ETA on a fix for this issue?

We think we’ve identified the problem and are testing a fix. The problem is in Unity (not the package), so it will likely be a few weeks before it makes it into an official release.

Thank you, removing armv7 helped me!

I’m encountering this error right now after attempting to build a spectatorview app for iPhone (from Mixed Reality Toolkit). I’m not very profound with xcode nor building for iOS in general, so I have a hard time deciphering how to go about this task that seemingly sounds quite simple. Is this a setting in xcode or Unity? How do I find it?

About the armv7. This is a blocker for Existing Applications. How do you go around Apple requirements on this? For example, an existing project that targets both armv7 and arm64 but only uses AR for compatible devices, how do you build against it? Thanks in advance.

1 Like

Did you find any solution for this specific problem yet?
Thank you