Xcode 14 问题

1.在 M1 mac 上使用 Rosetta 运行模拟器

以前版本的 Xcode 可以查看 /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app 显示简介,在简介页面中勾选“使用Rosetta打开”。Xcode 14.0 中没有这个勾选项,可以使用如下方式:
1.运行xcrun simctl list devices查看安装的模拟器 uuid
2.运行xcrun simctl boot simulator_uuid --arch=x86_64; arch -x86_64 /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator,并保持该终端打开。(simulator_uuid 为要运行的模拟器 uuid,如果该模拟器已经为运行状态,需要先退出。)

2.用 Xcode 14 打包的静态 Framework 在 Xcode 13 上集成编译报 link 错误

Xcode 14 默认开启了 objc stubs optimizations 功能,如果需要关闭该功能,可以在 Build Settings 的 Other C Flags 中加上 -fno-objc-msgsend-selector-stubs(注意:加上该 flag 之后 Framework 工程在 Xcode 13 无法编译)。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容