Skip to content
프로젝트

kitschpatrol/KPRunEverywhereXcodePlugin

GitHub에서 보기

소개

An Xcode 7 plugin to build and run an app across multiple iOS devices with one click.

웹 및 앱 개발

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
0

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

KPRunEverywhereXcodePlugin

License: MIT

An Xcode 7 plugin to build and run an app across multiple iOS devices with one click.

[!IMPORTANT]

This was nice while it lasted, but Xcode has long since abandoned support for this type of plugin.

Overview

Gone are the days of manually switching between device destinations and fiddling with the "play" and "stop" buttons. RunEverywhere streamlines development and testing across multiple iPhone / iPod models. This is especially handy if you're building multi-player games, universal apps, or networked apps in general.

The plugin adds two new commands to Xcode's "Product" menu.

Xcode's Product menu with the Run Everywhere and Stop Everywhere commands

Getting started

Dependencies

KPRunEverywhere is compatible with Xcode 5, 6, and 7. It doesn't work with Xcode 8 or newer, which dropped support for plugins. (See Known issues.)

It's specifically tested and known to work on:

  • Xcode 5.1.0 + OS X 10.9.2
  • Xcode 6.0.1 + OS X 10.9.5
  • Xcode 6.3.0 + OS X 10.10.3
  • Xcode 7.0.1 + OS X 10.11.0
  • Xcode 7.1.0 + OS X 10.11.1

Later updates added the plugin compatibility UUIDs for Xcode 7.2 and 7.3, and a fix for a crash in Xcode 7.2.1. The Xcode project was last updated with Xcode 7, and targets OS X 10.10 or newer.

Installation

Two options here:

Via Alcatraz

RunEverywhere is available through the Alcatraz Xcode plugin management system.

From source

Clone the repository and open the project in Xcode:

git clone https://github.com/kitschpatrol/KPRunEverywhereXcodePlugin.git
open KPRunEverywhereXcodePlugin/KPRunEverywhereXcodePlugin.xcodeproj

Simply build the Xcode project and restart Xcode. The plugin will automatically install to ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/.

To uninstall, just remove the plugin from the above directory, and restart Xcode:

rm -rf ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/KPRunEverywhereXcodePlugin.xcplugin

Usage

Connect your iOS devices, then choose a command from the "Product" menu or use its keyboard shortcut:

Command Shortcut Description
Run Everywhere ⌃ + ⌥ + ⌘ + R Builds and runs the app on all attached devices.
Stop Everywhere ⌃ + ⌥ + ⌘ + . Stops the app on all attached devices.

Background

Implementation notes

The plugin works by driving Xcode's own menus. Run Everywhere reads the device list from the "Product > Destination" menu, then selects each device in turn and triggers "Build" and "Run" from the "Product" menu. It waits for Xcode's internal build and launch notifications before moving on to the next device, instead of waiting for a fixed amount of time, and reselects the original destination at the end. Stop Everywhere triggers "Stop" until the menu item is no longer enabled.

Xcode builds the destination list lazily when the menu is opened, so the plugin asks the menu's delegate to populate it before reading it.

Known issues

  • This isn't going to work on the simulator.
  • Running everywhere might not work if Xcode loses focus during the app-launch process. I recommend giving Xcode a second to collect itself after invoking Run Everywhere. This is an unfortunate side-effect of the menu-manipulating implementation.
  • Unfortunately, Apple removed support for traditional plugins in Xcode 8, and the new official APIs do not allow the functionality implemented in KPRunEverywhere. Issue #17 has the details. An AppleScript approach might be your best bet if you need this functionality in Xcode 8+.

Maintainers

kitschpatrol

Acknowledgments

Built with Delisa Mason's excellent Xcode Plugin Template.

Inspiration was drawn from a couple of Stack Overflow threads:

Thanks to Simon Fridlund for adding the Xcode 7.2 compatibility UUID, and to Simon Coulton for fixing a crash in Xcode 7.2.1.

License

MIT © Eric Mika

관련 프로젝트 살펴보기

불러오는 중…