2

I am trying to run a project with objective C and with a private SDK and I get the error

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_DetectionSDK", referenced from:
      objc-class-ref in ViewController.o
      objc-class-ref in AppDelegate.o
      objc-class-ref in SecondViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Is weird (for me) because in the real iphone runs (and in xcode 11), but in the simulator does not

smithdev
  • 31
  • 1
  • 2
  • looks like you are missing including required framework into your project. `_OBJC_CLASS_$_DetectionSDK` is missing now sure which one, may be the Vision framework. – Buntylm Nov 11 '19 at 01:55
  • how would be "required"?? I added it in General-> Linked frameworks, or is there other way? thanks – smithdev Nov 11 '19 at 01:58
  • Just clean and build now if you added. FYI: follow this answer https://stackoverflow.com/questions/18408531/xcode-build-failure-undefined-symbols-for-architecture-x86-64 – Buntylm Nov 11 '19 at 02:00
  • I did what say the link, but was error :/ – smithdev Nov 11 '19 at 02:13
  • 1
    It's perfectly fine! Because there are lots of framework which are just build for x64 bit architecture and you are build on Simulator that is 32-bit architecture. – Sohil R. Memon Nov 11 '19 at 04:21

2 Answers2

0

Looks like your private SDK doesn't contains simulator slices. To check this, run command lipo -i path\to\your_private_sdk\your_private_sdk. Output should contains something like i386 x86_64 armv7 arm64

% lipo -i your_private_sdk 
Architectures in the fat file: your_private_sdk are: i386 x86_64 armv7 arm64 

If it contains only armv7 arm64 architectures, you need to create universal framework from your private SDK.

More details you can find here: How to create universal (fat) library

Vitalii Gozhenko
  • 9,220
  • 2
  • 48
  • 66
-1

You can try - 1:) delete the app from simulator , clean and build again. 2:) try to reinstall that private sdk & then .clean and build.

Help
  • 84
  • 4