nicklanasa / xcode-mode

xcode-mode is a minor mode for Emacs to perform Xcode like actions in your projects.
58 stars 6 forks source link

MELPA Build Status

xcode-mode

xcode-mode is a minor mode for Emacs to perform xcodebuild actions in your Xcode projects.

Note: xcode-mode uses ios-sim and xctool, xctool will use a .xctool-args file in the root project directory to execute commands.

xcode-mode

Installation

Requires

(use-package xcode-mode :ensure t)

Manual Installation

git clone https://github.com/nicklanasa/xcode-mode.git

Usage

(require 'xcode-mode)
(xcode-mode 1)

Hydra (Popup window with command list)

Can also be customized by creating your own bindings

(global-set-key (kbd "s-l") 'xcode-launcher/body)

Keybindings

All keybindings start with C-M-x. All functions in xcode-mode have a two-letter mnemonic shortcut, for instance, to build a project with a .xctool-args file in it's root directory you would do C-M-x bb.

Here are all the keybindings:

Misc

Change default simulator

Simulator types

com.apple.CoreSimulator.SimDeviceType.iPhone-4s, 9.2
com.apple.CoreSimulator.SimDeviceType.iPhone-5, 9.2
com.apple.CoreSimulator.SimDeviceType.iPhone-5s, 9.2
com.apple.CoreSimulator.SimDeviceType.iPhone-6, 9.2
com.apple.CoreSimulator.SimDeviceType.iPhone-6-Plus, 9.2
com.apple.CoreSimulator.SimDeviceType.iPhone-6s, 9.2
com.apple.CoreSimulator.SimDeviceType.iPhone-6s-Plus, 9.2
com.apple.CoreSimulator.SimDeviceType.iPad-2, 9.2
com.apple.CoreSimulator.SimDeviceType.iPad-Retina, 9.2
com.apple.CoreSimulator.SimDeviceType.iPad-Air, 9.2
com.apple.CoreSimulator.SimDeviceType.iPad-Air-2, 9.2
com.apple.CoreSimulator.SimDeviceType.iPad-Pro, 9.2
com.apple.CoreSimulator.SimDeviceType.Apple-TV-1080p, 9.1
com.apple.CoreSimulator.SimDeviceType.Apple-Watch-38mm, 2.1
com.apple.CoreSimulator.SimDeviceType.Apple-Watch-42mm, 2.1

(defvar xcode-ios-sim-devicetype "com.apple.CoreSimulator.SimDeviceType.iPhone-6, 9.1")

Example custom completing-read function to change user interaction.

(setq xcode-completing-read-function 'ivy-completing-read)

Contribute

Yes, please do. Tests are setup but none are written, would love some help here as well.

You'll find the repo at:

https://github.com/nicklanasa/xcode-mode.git

To fetch the test dependencies, install cask if you haven't already, then:

$ cd /path/to/xcode-mode
$ cask

Run the tests with:

$ ./run-tests.sh

License

Copyright (C) 2015 Nickolas S Lanasa III

Author: Nickolas S Lanasa III nicklanasa@gmail.com Keywords: Xcode, iOS

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.