我似乎无法找到解决此问题的方法。我在 Objective-C 中创建了一个新的自定义框架,当我将它包含在示例项目中时,我在编译时收到以下消息/错误:
ld: warning: ignoring file /Users/location/CustomFrameworkAPI.framework/CustomFrameworkAPI, missing required architecture x86_64 in file /Users/location/CustomFrameworkAPI.framework/CustomFrameworkAPI (2 slices)
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_CustomFrameworkAPI", referenced from:
objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
当我检查框架的架构时,我看到 x86_64 是我构建的自定义框架的一部分。有人可以告诉我问题是什么吗?
MacBook-Pro:CustomFrameworkAPI.framework user$ file CustomFrameworkAPI
CustomFrameworkAPI: Mach-O universal binary with 2 architectures
CustomFrameworkAPI (for architecture armv7): Mach-O dynamically linked shared library arm
CustomFrameworkAPI (for architecture arm64): Mach-O 64-bit dynamically linked shared library