react-native-unity-view icon indicating copy to clipboard operation
react-native-unity-view copied to clipboard

Undefined symbols for architecture arm64:

Open ziyoshams opened this issue 5 years ago • 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.

ziyoshams avatar May 06 '19 18:05 ziyoshams

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 avatar May 06 '19 18:05 honeyp0t

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

ziyoshams avatar May 06 '19 19:05 ziyoshams

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

ACacho22 avatar May 21 '19 20:05 ACacho22

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

ntsd avatar May 22 '19 00:05 ntsd

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?

ziyoshams avatar May 22 '19 13:05 ziyoshams

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

ntsd avatar May 22 '19 14:05 ntsd

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

ziyoshams avatar May 22 '19 16:05 ziyoshams

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.

ACacho22 avatar May 28 '19 16:05 ACacho22

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 avatar Jun 10 '19 00:06 DaveAdams88

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

vlobanov avatar Jun 19 '19 13:06 vlobanov