Create .ipa
files and distribute them from the command line, using any of the following methods:
- iTunes Connect
- HockeyApp
- Beta by Crashlytics
- RivieraBuild
- TestFairy
- DeployGate
- Fly It Remotely (FIR.im)
- 蒲公英 (PGYER)
- Amazon S3
- FTP / SFTP
Less cumbersome than clicking around in Xcode, and less hassle than rolling your own build script, Shenzhen radically improves the process of getting new builds out to testers and enterprises.
shenzhen
is named for 深圳, the Chinese city famous for being the center of manufacturing for a majority of consumer electronics, including iPhones and iPads. It’s part of a series of world-class command-line utilities for iOS development, which includes Cupertino (Apple Dev Center management), Houston (Push Notifications), Venice (In-App Purchase Receipt Verification), Dubai (Passbook pass generation), and Nashville (iTunes Store API).
Installation
1
|
|
JSON Build Error
Users running Mac OS X Mavericks with Xcode 5.1 may encounter an error when attempting to install the json
gem dependency. As per the Xcode 5.1 Release Notes:
The Apple LLVM compiler in Xcode 5.1 treats unrecognized command-line options as errors. This issue has been seen when building both Python native extensions and Ruby Gems, where some invalid compiler options are currently specified.
To work around this, install the json
gem first with the following command:
1
|
|
Usage
For best results, set your environment localization to UTF-8, with
$ export LC_ALL="en_US.UTF-8"
. Otherwise, Shenzhen may return unexpectedly with the error “invalid byte sequence in US-ASCII”.
Shenzhen adds the ipa
command to your PATH:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
|
Building & Distribution
1 2 3 |
|
RivieraBuild Distribution
1
|
|
Shenzhen will load credentials from the environment variable
RIVIERA_API_TOKEN
unless otherwise specified. To get the list of availability options, visit http://api.rivierabuild.com
HockeyApp Distribution
1
|
|
Shenzhen will load credentials from the environment variable
HOCKEYAPP_API_TOKEN
unless otherwise specified.
TestFairy Distribution
1
|
|
Shenzhen will load credentials from the environment variable
TESTFAIRY_API_KEY
unless otherwise specified.
Crashlytics Beta Distribution
1
|
|
Shenzhen will load credentials from the environment variables
CRASHLYTICS_API_TOKEN
&CRASHLYTICS_BUILD_SECRET
, and attempt to run the submit executablesubmit
in the path to Crashlytics.framework specified byCRASHLYTICS_FRAMEWORK_PATH
unless otherwise specified.
DeployGate Distribution
1
|
|
Shenzhen will load credentials from the environment variable
DEPLOYGATE_API_TOKEN
andDEPLOYGATE_USER_NAME
unless otherwise specified.
FTP Distribution
1
|
|
SFTP Distribution
1
|
|
Amazon S3 Distribution
1
|
|
Shenzhen will load credentials from the environment variables
AWS_ACCESS_KEY_ID
,AWS_SECRET_ACCESS_KEY
andAWS_REGION
unless otherwise specified.
FIR (Fly it Remotely)
1
|
|
Shenzhen will load credentials from the environment variables
FIR_USER_TOKEN
,FIR_APP_ID
unless otherwise specified.
蒲公英 (PGYER)
1
|
|
Shenzhen will load credentials from the environment variables
PGYER_USER_KEY
,PGYER_API_KEY
unless otherwise specified.
iTunes Connect Distribution
1
|
|
Shenzhen will load credentials from the environment variables
ITUNES_CONNECT_ACCOUNT
andITUNES_CONNECT_PASSWORD
unless otherwise specified. If only an account is provided, the keychain will be searched for a matching entry.The
-i
(or--apple-id
) flag is “An automatically generated ID assigned to your app”. It can be found via iTunes Connect by navigating to: * My Apps -> [App Name] -> More -> About This App -> Apple IDFor a fully hands-free upload, in a CI environment for example, ensure your iTunes Connect credentials are stored in your keychain, and that the keychain item has the Validation app in its ‘Always allow access’ list. Running Shenzhen once with the
--save-keychain
flag, and clickingAlways Allow
on the prompt will set this up for you.
Displaying Embedded .mobileprovision Information
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
Creator
Mattt Thompson (@mattt)
License
Shenzhen is released under an MIT license. See LICENSE for more information.