从终端运行Xcode项目以Rosetta模式运行?
我有M1机器, 我有一个项目,我只需要Rosetta即可运行它,而不是从Xcode获取信息菜单
我试图运行命令: Arch -X86_64 Open〜< projectName> .xcodeproj
,
但该项目每次都无法构建。
有人可以帮助我使用命令以在Rosetta模式下从命令行构建项目,
I have M1 machine,
I have one project that I only need Rosetta to run it, instead of toggle it on/off from Xcode get info menu
I tried to run the command:arch -x86_64 open ~<PROJECTNAME>.xcodeproj
but the project failed to build each time.
Can someone help me with a command to build the project from command line in Rosetta mode,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用以下命令在 Rosetta 下运行默认的 Xcode 安装,而不是维护两个 Xcode 副本:
XCode update
使用 XCode 14.3,您可以选择要显示的目标架构,您可以选择“显示两者”以同时显示 M1 和 Rosetta默认 XCode 安装中的模拟器目标版本:
Instead of maintaining two copies Xcode, you can use the following command to run your default Xcode installation under rosetta:
XCode update
With XCode 14.3 you can choose the destination architecture to be shown, you can select "Show both" to show both M1 and rosetta version of the simulator destination from the default XCode installation:
保留两份 Xcode 副本,并将其中一份保留为 Rosetta 模式。您甚至可以将其命名为 Xcode-Rosetta,这样您就知道哪个是哪个。
这样就无需为同一个应用程序打开和关闭 Rosetta。
Keep two copies of Xcode and keep one of them in Rosetta mode. You might even name it Xcode-Rosetta so you know which is which.
That way there's no need to turn Rosetta on and off for the same app.