How to create Archive build with Specific / Native Only Architecture for Intel based Latest Mac OS

436 views Asked by At

Recently i was working on a project (macOs application) for intel chip based for Latest macOS.

My working environment:

Xcode: Version 13.4.1 (13F100)

Mac OS: Monterey Version: 12.5 (21G72) Chip: Intel

The problem i am having is my code runs from Xcode without any issue. 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.

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?

I know it can be changed from the "Build setting -> Architectures" but i could not find what to change.

enter image description here

1

There are 1 answers

1
Swift Dev Journal On

Archive uses the Release build configuration when building. Setting the Build Active Architecture Only setting to YES for release builds will create an Intel-only archive.

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. You should be able to create a universal archive from an Intel Mac without errors.