All Projects → klaaspieter → Chxcode

klaaspieter / Chxcode

Licence: mit
Changes the current Xcode

Projects that are alternatives of or similar to Chxcode

Mvvm C Templates
Templates for MVVM-C architecture
Stars: ✭ 27 (-47.06%)
Mutual labels:  makefile, xcode
Genie
GENie - Project generator tool
Stars: ✭ 693 (+1258.82%)
Mutual labels:  makefile, xcode
Kshobjcuml
KSHObjcUML can show oriented graph of dependencies between Objective-C and Swift classes in your project
Stars: ✭ 1,039 (+1937.25%)
Mutual labels:  xcode
Android device motorola osprey
Stars: ✭ 50 (-1.96%)
Mutual labels:  makefile
Asm Dom Boilerplate
A simple boilerplate to start using asm-dom without configuration.
Stars: ✭ 49 (-3.92%)
Mutual labels:  makefile
Swiftymessenger
Swift toolkit for passing messages between iOS apps and extensions.
Stars: ✭ 48 (-5.88%)
Mutual labels:  xcode
Draft Ietf Doh Dns Over Https
Discussion of draft-ietf-doh-dns-over-https in the IETF's DOH Working Group
Stars: ✭ 49 (-3.92%)
Mutual labels:  makefile
Docker Compose Kafka
Multi-broker Kafka cluster and Zookeeper ensemble in Docker
Stars: ✭ 47 (-7.84%)
Mutual labels:  makefile
Idris Blink
A simple Idris program to blink the LED on an Arduino
Stars: ✭ 50 (-1.96%)
Mutual labels:  makefile
Largest Contentful Paint
Specification for the LargestContentfulPaint API
Stars: ✭ 49 (-3.92%)
Mutual labels:  makefile
R.swift
Strong typed, autocompleted resources like images, fonts and segues in Swift projects
Stars: ✭ 8,419 (+16407.84%)
Mutual labels:  xcode
Device xiaomi grus Twrp
TWRP device tree for Xiaomi Mi 9 SE(treble)
Stars: ✭ 49 (-3.92%)
Mutual labels:  makefile
Vsalert
An drop-in replacement for UIAlertController with more power and better looks.
Stars: ✭ 48 (-5.88%)
Mutual labels:  xcode
Lichobile
lichess.org mobile application
Stars: ✭ 1,043 (+1945.1%)
Mutual labels:  xcode
Tgir
Official repository for Thank Goodness It's RabbitMQ (TGIR)!
Stars: ✭ 48 (-5.88%)
Mutual labels:  makefile
Webfsd
A simple HTTP server for mostly static content written in C
Stars: ✭ 50 (-1.96%)
Mutual labels:  makefile
Rlp
An Example of Using Literate Programming for R Package Development
Stars: ✭ 47 (-7.84%)
Mutual labels:  makefile
Booktree
UPDATE: I've decided that this project is not useful enough, Git for local editing is not the bottleneck. We must focus on ranking algorithms instead: https://github.com/cirosantilli/write-free-science-books-to-get-famous-website
Stars: ✭ 48 (-5.88%)
Mutual labels:  makefile
Openwrt Extra
extra openwrt package feed (samba 4.12.x)
Stars: ✭ 49 (-3.92%)
Mutual labels:  makefile
Kotlin Multiplatform Showcase
A real minimal app illustrating Kotlin Multiplatform
Stars: ✭ 51 (+0%)
Mutual labels:  xcode

chxcode

Build Status

Changes the current Xcode.

Installation

brew tap klaaspieter/formula
brew install chxcode

Usage

With the following in your .bashrc, .zshrc file:

source /usr/local/share/chxcode/chxcode

List available Xcodes:

$ chxcode
  9.2
  9.3
  9.4

Select Xcode for the current shell:

$ chxcode 9.3
$ chxcode
  9.2
* 9.3
  9.4
$ echo "$DEVELOPER_DIR"
/Applications/Xcode-9.3.app/Contents/Developer

Auto-switching

To automatically switch the current Xcode version when you cd between different directories, load auto in ~/.bashrc or .zshrc:

source /usr/local/share/chxcode/chxcode
source /usr/local/share/chxcode/auto

Auto looks for an .xcode-version file and automatically selects that version for the current folder and any of it's subfolders.

For example:

$ xcode-select -p
/Applications/Xcode-9.4.app/Contents/Developer
$ chxcode
  9.2
  9.3
* 9.4
$ echo "9.3" > project/.xcode-version
$ cd project
$ xcode-select -p
/Applications/Xcode-9.3.app/Contents/Developer
$ chxcode
  9.2
* 9.3
  9.4

Xcodes

When chxcode is sourced it auto-detects installed Xcodes. After installing a new Xcode you must restart the shell before chxcode can find them.

How it works

chxcode uses Spotlight (through mdfind) to search for the com.apple.dt.Xcode bundle identifier. It then uses mdls to find the Xcode version. Switching Xcodes is done by setting the DEVELOPER_DIR environment variable.

man xcode-select on the DEVELOPER_DIR environment variable:

Overrides the active developer directory. When DEVELOPER_DIR is set, its value will be used instead of the system-wide active developer directory.

Test

With shunit2 installed, run:

$ ./test/runner

To run individual test files:

# Interactive shell
zsh -i test/[name]_test
bash -i test/[name]_test

# Non-interactive shell
zsh test/[name]_test
bash test/[name]_test

Acknowledgements

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].