417-72KI / xcode-arch

Set `Open using Rosetta` option on Xcode easily

Repository from Github https://github.com417-72KI/xcode-archRepository from Github https://github.com417-72KI/xcode-arch

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/xcode-arch@0.1.0

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+)

About

Set `Open using Rosetta` option on Xcode easily

License:MIT License


Languages

Language:Swift 82.0%Language:Shell 13.0%Language:C 2.4%Language:Makefile 1.8%Language:Objective-C 0.8%