我正在尝试为iOS应用程序制作动态框架.感谢新版本的Xcode(6),我们可以在创建新项目时选择Cocoa Touch Framework,不再需要添加聚合目标,运行脚本等等.构建框架时我没有问题.但是当我尝试在iOS应用程序中使用它时,我遇到了一些架构问题.
ld: warning: ignoring file /Library/Frameworks/MyFramework.framework/MyFramework, file was built for x86_64 which is not the architecture being linked (arm64): /Library/Frameworks/MyFramework.framework/MyFramework
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_MyFrameworkWebService", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ld: warning: ignoring file /Library/Frameworks/MyFramework.framework/MyFramework, file was built for x86_64 which is not the architecture being linked (armv7): /Library/Frameworks/MyFramework.framework/MyFramework
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_MyFrameworkWebService", referenced …Run Code Online (Sandbox Code Playgroud) 我注意到 Xcode 9 有一些很奇怪的地方。当我在我的主情节提要上并更改选择的设备以查看适当格式的视图控制器时,我注意到如果故事板上选定的设备与我部署的设备不同。我已经完成了测试,似乎已采用故事板上所选设备的布局。
有没有人遇到过这个问题?
此问题也存在于 Xcode 9.1 测试版中