Kourosh
Kourosh

Reputation: 618

Undefined symbols for architecture arm64 in Unity AR Foundation Xcode project

I am simply building the default sample project Unity provided for AR Foundation: https://github.com/Unity-Technologies/arfoundation-samples

I'm using

Unity 2019.1.5f1

Xcode 10.2.1

I don't change anything in the Unity project. It's targeting iOS so the target architecture is set to arm64.

I get the following linker issues:

xcode build error

Upvotes: 2

Views: 6517

Answers (3)

Tommy Elliott
Tommy Elliott

Reputation: 491

I had a variation of this error for myself (with 700+ lines of undefined symbols all related to ARFoundation) that I solved simply by ensuring that the File > Build Settings selected platform is switched to iOS before executing Flutter > Export IOS (Release). I consistently got the error building the Flutter app whenever Android was the selected platform at the time Flutter > Export IOS (Release) was clicked, even though the platform switches during the export and even though Export Android (Release) doesn't have the same issue. Therefore, my process is now always:

  1. (make sure iOS is the selected platform in File > Build Settings)
  2. Flutter > Export IOS (Release)
  3. Flutter > Export Android (Release)
  4. File > Build Settings > iOS > Switch Platform
  5. Quit Unity (since the currently selected scene/asset modifying ProjectSettings is annoying after you do a commit otherwise)

Upvotes: 0

Adam Polak Moetsi
Adam Polak Moetsi

Reputation: 543

I solved it this way: https://github.com/f111fei/react-native-unity-view/issues/112#issuecomment-494548815

"Hi, go to General on your project panel and scroll down to Linked Frameworks and Libraries. Add ARKit's framework to your list"

Fixed it without having to downgrade :)

Upvotes: 1

Helper12.31
Helper12.31

Reputation: 56

I had the same error today. It took me about 8 hours to solve it, so I hope I can help you to save some time.

The magic happens when you downgrad the AR Foundation and ARKit plugin to 2.1.

Maybe just downgrading the ARKit plugin will be enough, but I didn't try it yet.

As I figured out, AR Foundation 2.2 brings ARKit 3 with it. For this you need Xcode 11 beta to build it, but unfortunately you get an error at app start, because ARKit 3 is presumably just available with iOS 13.

I hope you'll get it work.

Upvotes: 4

Related Questions