Set `Open using Rosetta` option on Xcode easily

Overview

xcode-arch

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

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+)
Comments
  • 80433 trace trap  xcode-arch -p

    80433 trace trap xcode-arch -p

    Hi!

    I have a trouble with Xcode 14.0.0-Beta.6. It says "80023 trace trap xcode-arch -p" when I try to execute "xcode-arch -p". Also I have the same answer on my attempt with "DEVELOPER_DIR=/Applications/Xcode-14.0.0-Beta.6.app xcode-arch -p".

    Can you help?

    opened by Pavel-Laukhin 2
  • to support architecture preferences toggling for Simulator.app

    to support architecture preferences toggling for Simulator.app

    From xcode 14 beta onwards, we no longer have "Open with Rosetta" option for both xcode and simulator. This tools can be useful as it still force the application to run in preferred architecture. I tried and it works with xcode and just wondering can it support simulator path too ?

    opened by brendansiow 1
  • Update dependency apple/swift-argument-parser to from:

    Update dependency apple/swift-argument-parser to from: "1.1.4"

    Mend Renovate

    This PR contains the following updates:

    | Package | Update | Change | |---|---|---| | apple/swift-argument-parser | patch | from: "1.1.3" -> from: "1.1.4" |


    Release Notes

    apple/swift-argument-parser

    v1.1.4

    Compare Source

    Changes
    • The generate-manual plugin now defaults to creating single page manuals. The --single-page flag has been replaced with --multi-page to restore the previous default functionality. ([#​472])

      Migration: Update scripts that invoked generate-manual without --single-page to include --multi-page and update scripts that invoked generate-manual with --single-page to omit the flag.

    • The "experimental" prefix from the generate-manual plugin has been removed. ([#​475])

      Migration: Update scripts to invoke the generate manual plugin via swift package generate-manual instead of swift package plugin experimental-generate-manual.

    Fixes
    • The generate-manual plugin is correctly declared as a product, making the plugin visible to clients. ([#​456])
    • The generate-manual plugin's --authors arguments are now correctly passed to the underlying generation tool. ([#​471])
    • Manuals generated by the generate-manual plugin now include the option's value names and do not include value names for flags. ([#​473])
    • Built-in flags such as --help and --version are now correctly marked as optional fixing some generated content which indicated the flags are always required. ([#​474])
    • Value descriptions are now correctly derived for types which are ExpressibleByArgument and RawRepresentable by String. Help menus will now display valid default values for such types. ([#​476])

    The 1.1.4 release includes contributions from [ian-twilightcoder], [MarcoEidinger], and [rauhul]. Thank you!


    Configuration

    📅 Schedule: Branch creation - "after 7pm every weekday,every weekend,before 8am every weekday" in timezone Asia/Tokyo, Automerge - At any time (no schedule defined).

    🚦 Automerge: Enabled.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Mend Renovate. View repository job log here.

    dependencies 
    opened by renovate[bot] 0
  • Update dependency apple/swift-argument-parser to from:

    Update dependency apple/swift-argument-parser to from: "1.1.3"

    Mend Renovate

    This PR contains the following updates:

    | Package | Update | Change | |---|---|---| | apple/swift-argument-parser | patch | from: "1.1.2" -> from: "1.1.3" |


    Release Notes

    apple/swift-argument-parser

    v1.1.3

    Compare Source

    Additions
    • ArgumentParser now includes a SwiftPM plugin for generating man pages. Explore the functionality and configuration by running swift package plugin experimental-generate-manual --help from your package root. ([#​332])
    Fixes
    • Hidden subcommands are now excluded from completion scripts. ([#​443])
    • When an invalid value is provided for a CaseIterable type, the error message now includes a list of valid inputs. ([#​445])
    • There's now a diagnostic when an AsyncParsableCommand is incorrectly placed under a non-async root command. ([#​436])

    The 1.1.3 release includes contributions from [keith], [KeithBird], [konomae], [LucianoPAlmeida], and [rauhul]. Thank you!


    Configuration

    📅 Schedule: Branch creation - "after 7pm every weekday,every weekend,before 8am every weekday" in timezone Asia/Tokyo, Automerge - At any time (no schedule defined).

    🚦 Automerge: Enabled.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Mend Renovate. View repository job log here.

    dependencies 
    opened by renovate[bot] 0
  • Update dependency apple/swift-argument-parser to from:

    Update dependency apple/swift-argument-parser to from: "1.2.0"

    Mend Renovate

    This PR contains the following updates:

    | Package | Update | Change | |---|---|---| | apple/swift-argument-parser | minor | from: "1.1.4" -> from: "1.2.0" |


    Release Notes

    apple/swift-argument-parser

    v1.2.0

    Compare Source

    Additions
    • You can now provide a title in an @OptionGroup declaration. Titled option groups are listed separately in the help screen under that title as a heading. ([#​492])

    • Two new parsing strategies have been added for @Argument array properties:

      • .allUnrecognized captures all unrecognized inputs after parsing known flags, options, and arguments.
        • .postTerminator collects any inputs that follow the -- terminator.

      See the ArgumentArrayParsingStrategy documentation for more. ([#​496])

    • Default values are now supported for @Argument or @Option properties with optional type, allowing you to initialize those properties with nil. Providing a non-nil default value results in a warning, since optional properties with non-nil defaults don't need to be declared as optionals. ([#​477], [#​480])

    Changes
    Fixes
    • Invalid init(from:) decoding initializers are now correctly diagnosed by ArgumentParser's validators. ([#​487])
    • Default values are now correctly displayed as flags for @Flag properties with inversions or EnumerableFlag types. ([#​486])
    • The help display for non-string-backed raw representable types has been corrected to not show raw Swift values. Instead, the help display uses the type's customized defaultValueDescription and allValues implementations. ([#​494])
    • Properties at different levels of a command hierarchy with the same Swift name but different argument names no longer collide. ([#​495])
    • The generate-manual plugin name is improved when used from within Xcode. ([#​505])
    • Documentation fixes and improvements.

    The 1.2.0 release includes contributions from [allevato], [clayellis], [compnerd], [d-ronnqvist], [natecook1000], [randomeizer], and [rauhul]. Thank you!



    Configuration

    📅 Schedule: Branch creation - "after 7pm every weekday,every weekend,before 8am every weekday" in timezone Asia/Tokyo, Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    dependencies 
    opened by renovate[bot] 0
  • Fail launch Xcode with `--relaunch` option

    Fail launch Xcode with `--relaunch` option

    $ xcode-arch -cr
    Set x86_64 for /Applications/Xcode-14.1.0-Release.Candidate.2.app
    The application cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-600 "procNotFound: no eligible process with specified descriptor" UserInfo={_LSLine=387, _LSFunction=_LSAnnotateAndSendAppleEventWithOptions}
    
    opened by 417-72KI 0
  • Dependency Dashboard

    Dependency Dashboard

    This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

    Open

    These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

    Detected dependencies

    github-actions
    .github/workflows/ci.yml
    • actions/checkout v3
    • actions/checkout v3
    • actions/cache v3
    • actions/upload-artifact v3
    • actions/download-artifact v3
    • kishikawakatsumi/xcresulttool v1
    swift
    Package.swift
    • apple/swift-argument-parser from: "1.1.4"

    • [ ] Check this box to trigger a request for Renovate to run again on this repository
    opened by renovate[bot] 0
Releases(0.0.2)
  • 0.0.2(Oct 6, 2022)

    What's Changed

    • Update dependency apple/swift-argument-parser to from: "1.1.4" by @renovate in https://github.com/417-72KI/xcode-arch/pull/4
    • Add --launch and --kill options by @417-72KI in https://github.com/417-72KI/xcode-arch/pull/5
    • Fix crashing when removed Xcode path is detected by @417-72KI in https://github.com/417-72KI/xcode-arch/pull/7

    Full Changelog: https://github.com/417-72KI/xcode-arch/compare/0.0.1...0.0.2

    Source code(tar.gz)
    Source code(zip)
  • 0.0.1(May 25, 2022)

Owner
Takuhiro Muta
Mobile App Developer(iOS, Android)
Takuhiro Muta
LinkedLog is a Xcode plugin that includes a Xcode PCH header file template that adds the macros `LLog` and `LLogF` and parses their output to link from the console to the corresponding file and line.

LinkedLog Xcode Plugin LinkedLog is a Xcode plugin that includes a Xcode PCH file template that adds the macros LLog and LLogF. The LLog macro will wo

Julian F. Weinert 22 Nov 14, 2022
Find the union of a set of axis-aligned rectangles

RectangleContour My main product is a library named RectangleContour which contains one Swift module also named RectangleContour. The library implemen

Rob Mayoff 18 Dec 21, 2022
Puma - A set of build utilities to automate mobile application development and deployment

Puma → https://github.com/onmyway133/Swiftlane Puma is a set of build utilities

Puma Swift 5 Oct 8, 2022
SafeDecoder - a swift package that set defaults when Codable fails to decode a field

SafeDecoder is a swift package that set defaults when Codable fails to decode a field. SafeDecoder supports configurable default values, See SafeDecoder.Configuration.

GodL 4 Mar 21, 2022
A novel way to set attributes to the Font in SwiftUI.

A novel way to set attributes to the Font in SwiftUI.

Riiid 6 Oct 13, 2022
Easily generate cross platform Swift framework projects from the command line

SwiftPlate Easily generate cross platform Swift framework projects from the command line. SwiftPlate will generate Xcode projects for you in seconds,

John Sundell 1.8k Dec 27, 2022
Eval for Swift - Easily evaluate simple expressions on the go

Eval for Swift Easily evaluate simple expressions on the go... This is a port of the BigEval.js/Eval.net library Features: Evaluate basic math operato

Daniel Cohen Gindi 2 Mar 9, 2022
Start your next Open-Source Swift Framework 📦

SwiftKit enables you to easily generate a cross platform Swift Framework from your command line. It is the best way to start your next Open-Source Swi

Sven Tiigi 821 Dec 28, 2022
Open-source jailbreaking tool for many iOS devices

Open-source jailbreaking tool for many iOS devices *Read disclaimer before using this software. checkm8 permanent unpatchable bootrom exploit for hund

null 0 Nov 6, 2021
A free and open source xkcd comic reader for iOS.

A free, ad-free, open-source, native, and universal xkcd.com reader for iOS. Download it from the app store now! Architecture AFNetworking for network

Mike 249 Dec 12, 2022
Collaborative List of Open-Source iOS Apps

Open-Source iOS Apps A collaborative list of open-source iOS, iPadOS, watchOS and tvOS apps, your contribution is welcome ?? Jump to Apple TV Apple Wa

null 33k Dec 30, 2022
Open-source implementation of Apple's Combine for processing values over time

CombineX 简体中文 Open-source implementation of Apple's Combine for processing values over time. Though CombineX have implemented all the Combine interfac

Luo Xiu 1 Dec 30, 2021
Joplin - an open source note taking and to-do application with synchronization capabilities for Windows, macOS, Linux, Android and iOS. Forum: https://discourse.joplinapp.org/

Joplin® is a free, open source note taking and to-do application, which can handle a large number of notes organised into notebooks. The notes are sea

Laurent 33.7k Dec 30, 2022
Beam: the open source Reddit client for iOS

Beam for Reddit An open source Reddit client for iOS. Introduction Hi, we're Awkward. In 2014, we started working on a Reddit client called Beam. In t

awkward 250 Dec 30, 2022
Open source Clips-inspired app.

AlohaGIF Website Funny moments? Want to share it as a GIF, but you are worried that you will lose speech from video? Aloha will scan sound and attach

Mike Pyrka 61 Sep 16, 2022
Free and open source manga reader for iOS and iPadOS.

Aidoku A free and open source manga reading application for iOS and iPadOS. Features Ad free Robust WASM source system Online reading through external

null 421 Jan 2, 2023
Capacitor File Opener. The plugin is able to open a file given the mimeType and the file uri

Capacitor File Opener. The plugin is able to open a file given the mimeType and the file uri. This plugin is similar to cordova-plugin-file-opener2 without installation support.

Capacitor Community 32 Dec 21, 2022
🧸 Xcode Playground management made easy

Toybox Toybox made easy to manage Xcode Playgrounds. You can create and open Xcode Playground from CLI. $ toybox create Snippet # Generate ~/.toybox/S

Kohki Miki 130 Nov 8, 2022
🚀 Create, maintain, and interact with Xcode projects at scale

What's Tuist ?? Tuist is a command line tool that helps you generate, maintain and interact with Xcode projects. It's open source and written in Swift

Tuist 3.1k Jan 6, 2023