0

I've built a framework using cocoa touch framework in xcode and import this particular framework to this xcode iOS project.

I don't have any issues running the project on simulator.

However, I'm hitting these errors when running it on device (iPhone) and when building archive (.ipa file):

ld: warning: ignoring file /Users/xxx/yyy.framework/yyy, missing required architecture arm64 in file /Users/xxx/Documents/yyy.framework/yyy (2 slices)

Undefined symbols for architecture arm64: "_OBJC_CLASS_$_Checkbox", referenced from: objc-class-ref in ViewController.o

ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

What could be the settings differences when running on simulator vs running on device? Is it the build settings?

Update

I've already set these in the framework:

1) Valid Architectures to arm64,armv7 and armv7s

2) Header Search Path to $(inherited)

However it's still hitting the same issue :(

enter image description here enter image description here

user1872384
  • 6,886
  • 11
  • 61
  • 103
  • The framework lacks a 64-bit slice. You need to rebuild it so that it has one. – matt Feb 06 '18 at 02:38
  • Hi matt, how do I add the 64-bit slice? I've check the "Valid Architectures" and arm64 is already there indeed. – user1872384 Feb 06 '18 at 03:23
  • Omg... found out the root cause. it's quite embarrassing to admit that I should have choose the "Generic device" iOS device instead of iOS simulator when building the framework @.@.... Will leave this comment here, just in case anyone who made the same mistake can refer to it – user1872384 Feb 06 '18 at 03:58

0 Answers0