Skip to content
This repository has been archived by the owner on Sep 17, 2023. It is now read-only.
/ xcode-arch Public archive

Set `Open using Rosetta` option on Xcode easily

License

Notifications You must be signed in to change notification settings

417-72KI/xcode-arch

Repository files navigation

xcode-arch

A utility to switch running architecture of Xcode on M1 mac.

Warning

This tool is EOL because Xcode is no longer supported under Rosetta since 14.3.

Also, this tool will do nothing with Xcode 14.3.

See: https://developer.apple.com/documentation/xcode-release-notes/xcode-14_3-release-notes#Deprecations

Motivation

Currently, there is no way to toggle Open using Rosetta option other than in Finder.

off on
Rosetta off Rosetta on

This provides a command-line tool to set on/off or toggle Open using Rosetta option.

Installation

Homebrew(recommended)

brew install 417-72KI/tap/xcode-arch

Mint

mint install 417-72KI/[email protected]

Usage

$ xcode-arch -p
arm64 # `Open using Rosetta` is off
$ xcode-arch -c
Set x86_64 for /Applications/Xcode.app
$ xcode-arch -p
x86_64 # `Open using Rosetta` is on
$ xcode-arch -u
Set arm64 for /Applications/Xcode.app
$ xcode-arch -p
arm64 # `Open using Rosetta` is off

You can switch / print with specific Xcode path by using DEVELOPER_DIR.

$ DEVELOPER_DIR=/Applications/Xcode-13.2.1.app xcode-arch -c
`/Applications/Xcode-13.2.1.app` is running with x86_64

Requirements

  • macOS 12.0+
  • Xcode 13.3+ (Swift 5.6+)