[英]How to create Archive build with Specific / Native Only Architecture for Intel based Latest Mac OS
Recently i was working on a project (macOs application) for intel chip based for Latest macOS.最近我正在为基于最新 macOS 的英特尔芯片开发一个项目(macOs 应用程序)。
My working environment:我的工作环境:
Xcode: Version 13.4.1 (13F100) Xcode:版本 13.4.1 (13F100)
Mac OS: Monterey Version: 12.5 (21G72) Chip: Intel Mac OS:Monterey 版本:12.5 (21G72) 芯片:Intel
The problem i am having is my code runs from Xcode without any issue.我遇到的问题是我的代码从 Xcode 运行没有任何问题。 But when i try to archive it fails to create archive with an error because it has many codes that only run on intel based mac os and it's trying to create a universal app for both intel chip as well as apple with standard architecture.但是,当我尝试存档时,它无法创建存档并出现错误,因为它有许多代码只能在基于英特尔的 mac os 上运行,并且它正在尝试为英特尔芯片和具有标准架构的苹果创建一个通用应用程序。
So my question is how i can change the build Architecture for my project in order to run on apple MacOs based On intel Chip only?所以我的问题是如何更改我的项目的构建架构,以便仅在基于英特尔芯片的苹果 MacO 上运行?
I know it can be changed from the "Build setting -> Architectures" but i could not find what to change.我知道它可以从“构建设置-> 架构”中更改,但我找不到要更改的内容。
Archive uses the Release build configuration when building. Archive 在构建时使用 Release 构建配置。 Setting the Build Active Architecture Only setting to YES for release builds will create an Intel-only archive.对于发布版本,将 Build Active Architecture Only 设置为 YES 将创建一个仅限 Intel 的存档。
But you should fix the issue you're having creating universal archives.但是您应该解决您在创建通用档案时遇到的问题。 More and more people are buying Apple Silicon Macs and want apps that run natively on Apple Silicon.越来越多的人购买 Apple Silicon Mac 并想要在 Apple Silicon 上本地运行的应用程序。 You should be able to create a universal archive from an Intel Mac without errors.您应该能够从 Intel Mac 创建通用存档而不会出错。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.