[フレーム]
Last Updated: February 25, 2016
·
843
· pxpgraphics

Terminal Snippets for iOS Development

Remember to replace the following:
* {USER_NAME} with your system username
* {API_KEY} with your TestFlight API key.
* {TEAM_KEY} with your TestFlight Team API Key.

# ---------------------------------
# xcode functions
# ---------------------------------
function xcclean() {
 # Cleans the project via xctool CLI for workspace [1ドル] and scheme [2ドル] respectively.
 if [ -z "2ドル" ]
 then
 echo "Workspace: \"1ドル\"."
 xctool -workspace "1ドル.xcworkspace" -scheme "1ドル" -sdk iphonesimulator clean
 else
 echo "Workspace: \"1ドル\". Scheme: \"2ドル\"."
 xctool -workspace "1ドル.xcworkspace" -scheme "2ドル" -sdk iphonesimulator clean
 fi
}

function xcbuild() {
 # Builds project via xctool CLI for workspace [1ドル] and scheme [2ドル] respectively.
 if [ -z "2ドル" ]
 then
 echo "Workspace: \"1ドル\"."
 xctool -workspace "1ドル.xcworkspace" -scheme "1ドル" -sdk iphonesimulator build
 else
 echo "Workspace: \"1ドル\". Scheme: \"2ドル\"."
 xctool -workspace "1ドル.xcworkspace" -scheme "2ドル" -sdk iphonesimulator build
 fi
}

function xctest() {
 # Runs unit tests via xctool CLI for workspace [1ドル] and scheme [2ドル] respectively.
 if [ -z "2ドル" ]
 then
 echo "Workspace: \"1ドル\"."
 xctool -workspace "1ドル.xcworkspace" -scheme "1ドル" -sdk iphonesimulator test -parallelize
 else
 echo "Workspace: \"1ドル\". Scheme: \"2ドル\"."
 xctool -workspace "1ドル.xcworkspace" -scheme "2ドル" -sdk iphonesimulator test -parallelize
 fi
}

function xcbuildtests() {
 # Build tests without re-building the project (good for testing SDKs) via xctool CLI for workspace [1ドル] and scheme [2ドル] respectively.
 if [ -z "2ドル" ]
 then
 echo "Workspace: \"1ドル\"."
 xctool -workspace "1ドル.xcworkspace" -scheme "1ドル" -sdk iphonesimulator build-tests
 else
 echo "Workspace: \"1ドル\". Scheme: \"2ドル\"."
 xctool -workspace "1ドル.xcworkspace" -scheme "2ドル" -sdk iphonesimulator build-tests
 fi
}

function xcruntests() {
 # Runs tests from build-test command (good for testing SDKs) via xctool CLI for workspace [1ドル] and scheme [2ドル] respectively.
 if [ -z "2ドル" ]
 then
 echo "Workspace: \"1ドル\"."
 xctool -workspace "1ドル.xcworkspace" -scheme "1ドル" -sdk iphonesimulator run-tests -parallelize
 else
 echo "Workspace: \"1ドル\". Scheme: \"2ドル\"."
 xctool -workspace "1ドル.xcworkspace" -scheme "2ドル" -sdk iphonesimulator run-tests -parallelize
 fi
}

function xcall() {
 # Cleans and builds project, then runs test via xctool CLI for workspace [1ドル] and scheme [2ドル] respectively.
 if [ -z "2ドル" ]
 then
 echo "Workspace: \"1ドル\"."
 xctool -workspace "1ドル.xcworkspace" -scheme "1ドル" -sdk iphonesimulator clean build test -parallelize
 else
 echo "Workspace: \"1ドル\". Scheme: \"2ドル\"."
 xctool -workspace "1ドル.xcworkspace" -scheme "2ドル" -sdk iphonesimulator clean build test -parallelize
 fi
}

# ---------------------------------
# testflight aliases
# ---------------------------------
alias xcipa='ipa build && ipa distribute:testflight -a {API_KEY} -T {TEAM_KEY}'

# ---------------------------------
# iphone simulator functions
# ---------------------------------

function oips() {
 # Opens iPhone Simulator directory for SDK [1ドル] and architecture [2ドル] respectively.
 if [ -z "2ドル" ]
 then
 echo "iPhone Simulator 1ドル 32-bit."
 /Users/{USER_NAME}/Library/Application\ Support/iPhone\ Simulator/1ドル/Applications
 else
 echo "iPhone Simulator 1ドル 2ドル-bit."
 /Users/{USER_NAME}/Library/Application\ Support/iPhone\ Simulator/1ドル-2ドル/Applications
 fi
}

AltStyle によって変換されたページ (->オリジナル) /