From @dagio on Sat Apr 30 2016 21:03:41 GMT-0400 (EDT)
Hey @viktorbenei. I have a first version here : https://github.com/dag-io/appetize-deploy-step (the app source is here https://github.com/dag-io/appetize-deploy)
Notes :
- It’s compatible for iOS and Android (but I only checked iOS)
- It creates a variable APPETIZE_APP_URL to be reused in others steps
So basically we need to generate an IPA for the simulator. A quick script will do but we probably need to handle it using the Xcode archiver step ?
Here are the 2 steps in a workflow :
- script@1.1.0:
inputs:
- content: |-
#!/bin/bash
xcodebuild -showsdks
echo "Schema is $BITRISE_SCHEME"
echo "Workspace is $BITRISE_PROJECT_PATH"
app_folder=`xcodebuild \
-scheme $BITRISE_SCHEME \
-workspace $BITRISE_PROJECT_PATH \
-configuration Debug \
-arch i386 \
-sdk iphonesimulator9.3 \
-showBuildSettings | grep -m 1 BUILT_PRODUCTS_DIR | grep -oEi "\/.*"`
app_filename=`xcodebuild \
-scheme $BITRISE_SCHEME \
-workspace $BITRISE_PROJECT_PATH \
-configuration Debug \
-arch i386 \
-sdk iphonesimulator9.3 \
-showBuildSettings | grep -m 1 WRAPPER_NAME | grep -oEi "[a-zA-Z0-9]+\.app"`
xcodebuild \
-scheme $BITRISE_SCHEME \
-workspace $BITRISE_PROJECT_PATH \
-configuration Debug \
-arch i386 \
-sdk iphonesimulator9.3
app_filepath="$app_folder/$app_filename"
envman add --key BITRISE_SIMULATOR_IPA_PATH --value "$app_filepath"
envman print
- working_dir: "$BITRISE_SOURCE_DIR"
- git::https://github.com/dag-io/appetize-deploy-step.git@master:
is_always_run: false
inputs:
- app_path: $BITRISE_SIMULATOR_IPA_PATH
- platform: "ios"
- appetize_token: "YOUR_TOKEN_GO_HERE"