f111fei/react-native-unity-view

Undefined symbols for architecture arm64:

ziyoshams opened this issue ยท 10 comments

I have been using this package in another project successfully. But, I can't run it on my new project. Anyone has seen this error before?

ld: warning: arm64 function not 4-byte aligned: _unwind_tester from /Users/.../ios/UnityExport/Libraries/libiPhone-lib.a(unwind_test_arm64.o)
Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_ARAnchor", referenced from:
      objc-class-ref in ARSessionNative.o
  "_OBJC_CLASS_$_ARImageAnchor", referenced from:
      objc-class-ref in ARSessionNative.o
  "_OBJC_CLASS_$_AROrientationTrackingConfiguration", referenced from:
      objc-class-ref in ARSessionNative.o
  "_OBJC_CLASS_$_ARPlaneAnchor", referenced from:
      objc-class-ref in ARSessionNative.o
  "_OBJC_CLASS_$_ARReferenceImage", referenced from:
      objc-class-ref in ARSessionNative.o
  "_OBJC_CLASS_$_ARSession", referenced from:
      objc-class-ref in ARSessionNative.o
  "_OBJC_CLASS_$_ARWorldTrackingConfiguration", referenced from:
      objc-class-ref in ARSessionNative.o
  "Geo::GetiOSAppDocumentsDir()", referenced from:
      Geo::PathUtils::GetSandboxDataPath() in libiPhone-lib.a(GeoPathUtils.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I tried changing universal to arm64 architecture in Player Settings, but didn't work.
Any hints, tips, suggestions is appreciated. Thanks.

I've seen a similar error in my project. Could it be related to dead code stripping? Try turning it on or building in release mode and see if that helps.

@honeyp0t I've tried that, doesn't work.

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

ntsd commented

Same as me. it works without arm64.
Look like the export lib isn't supporting for arm 64
now I'll try updating unity to latest

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

Is it in Xcode?

ntsd commented

I pass this error now.
if you're using Simulator. Just change Target SDK setting to Simulator before build.

I can't seem to pass this error. And ARKit is in my Linked Libraries. @ntsd I think the docs say not to run on simulator.
Screen Shot 2019-05-22 at 12 10 55 PM

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

Is it in Xcode?

Yes it is. Anytime you see errors like the one listed it's because XCode is missing the referenced framework. ARKit should be searchable when you add to the target's listed frameworks.

Same as me. it works without arm64.
Look like the export lib isn't supporting for arm 64
now I'll try updating unity to latest

Im using ARFoundation with ARKit in unity which requires arm64, how would I go about getting this to work? I am having similar errors to this. If someone could point me in the right direction that would be great, thanks!

Versions im using:

Unity 2018.3.1
ARFoundation 1.5.0 - preview5
ARKIT XR Plugin - 2.2.0 preview1
Xcode 10.2.1

@DaveAdams88 Maybe try ARFoundation & ARKit XR version 2.1? Because 2.2 requires ios 13 & xcode 11