Unity-Technologies / arfoundation-samples

Example content for Unity projects based on AR Foundation
Other
3.04k stars 1.14k forks source link

[Bug] Undefined Objective-C symbol errors preventing iOS builds #1042

Closed WarrenHullStunts closed 1 year ago

WarrenHullStunts commented 1 year ago

Description Builds of the ARFoundation samples are failing with "undefined symbol" errors. Here are the first 3 of 99 for reference:

Undefined symbols for architecture arm64: "_objc_msgSend$copyFrom:withStride:toDestination:trackingState:", referenced from: -[TrackableProvider copyFromChanges:withStride:toAdded:toUpdated:toRemoved:] in libUnityARKit.a(TrackableProvider.o) "_objc_msgSend$deallocNativePtr:", referenced from: -[TrackableProvider copyFromChanges:withStride:toAdded:toUpdated:toRemoved:] in libUnityARKit.a(TrackableProvider.o) ___28-[TrackableProvider dealloc]_block_invoke in libUnityARKit.a(TrackableProvider.o) "_objc_msgSend$copyFrom:toDestination:trackingState:nativePtr:", referenced from: -[TrackableProvider copyFrom:withStride:toDestination:trackingState:] in libUnityARKit.a(TrackableProvider.o)

image

To Reproduce

Expected behavior The project should build successfully.

Actual behavior The project fails with 99 errors of the type "Undefined symbol: _objc_msgSend$..."

Smartphone

andyb-unity commented 1 year ago

You are required to build with Xcode 14 or newer as of com.unity.xr.arkit version 5.0.3. See the changelog for more information: https://docs.unity3d.com/Packages/com.unity.xr.arkit@5.0/changelog/CHANGELOG.html

This change is necessary for your app to behave correctly on iOS 16 devices, as Apple does not support iOS 16 API's in Xcode 13.

WarrenHullStunts commented 1 year ago

Thank you for the help. That solved the issue.