iOS and Android Device API
Deprecated App API Commands - iOS and Android
Overview
As we (and you!) transition into using the new App Management API as our primary app management methodology, we are deprecating our older App API program--however, we know that this information is still important for functionality in some environments as the transition to App Management API is completed. Therefore, deprecated sections of the App API that may have appeared in documentation referencing App API will be removed from their respective documents and relocated here for ease of access.
iOS
Install your app on a device
Request Body
The request's body should include the binary of your app's IPA file. To include the binary, use <code class="dcode">curl</code>'s optional flag <code class="dcode">--data-binary <path-to-ipa></code>.
Optional Parameters
- <code class="dcode">/v0/idevice/{device_id}/installer/install?ipa_id={id}</code>: use the previously uploaded ipa id
- <code class="dcode">/v0/idevice/{device_id}/installer/install?sign=false</code>: disable automated signing
Automated Signing
Your IPA will be signed by us to ensure that it can install on the target device. If you would like to manage signing yourself, register the device UDID in your Apple Developer Account and add the device to a provisioning profile. An IPA provisioned for the target device will disable automated signing but you can explicitly disable it with the optional ?sign=false parameter. Automated signing does not support app capabilities.
.app iOS builds
Please see the App API to learn how to upload a .app iOS build. Once uploaded, the packaged .app iOS build may be installed with the ipa_id parameter documented above. You may refer to the previously uploaded ipa example in the Examples section.
Examples
Upload and install a local IPA file:
Install a previously uploaded IPA file through the IPA API:
Install IPA file without automated signing:
Optional Parameters
- <code class="dcode">/v0/idevice/{device_id}/installer/install?ipa_id={id}</code>: use the previously uploaded ipa id
Uninstall your app from a device
Example
Install your dSYMs
Package your dSYMs
When you archive your app in Xcode to export an IPA, Xcode will generate Debug Symbol files (dSYMs) for that build. You should be able to find your archive in Xcode's Organizer (right-click it and select Show in Finder, then right-click the .xcarchive itself to Show Package Contents.) Right-click the dSYMs directory and select Compress "dSYMs" or do so via the command line with <code class="dcode">zip -r dSYMs.zip dSYMs</code>. A debuggable IPA and matching debug symbols are required to generate a Function Call Timeline for a given app. If not using the Automated Signing feature, you must sign the app with an <code class="dcode">iOS App Development</code> profile.
Request Body
The request's body should be multipart/form-data that passes the binary of your app's IPA file and the associated dSYMs zip file. To perform a multipart request, use curl's optional flag -F ipa=@ -F dsyms=@. Alternatively, the ipa_id and dsyms_id of a previously uploaded pair of ipa and dSYMs may be provided via optional query parameters.
Optional Query Parameters
- ipa_id={ipa_id}: use a previously uploaded IPA ID. This can be passed in lieu of the IPA file binary.
- dsyms_id={dsyms_id}: use a previously uploaded dSYMs ID. This can be passed in lieu of the dSYMs zip.
- sign=false: disable automated signing.
Example
Upload and install an IPA and dSYMs zip file pair:
Install an IPA and dSYMs zip file pair previously uploaded using the app API:
Install an IPA and dSYMs zip file pair without automated signing:
Uninstall your dSYMs
Example
Android
Install and Uninstall an APK
Install
To install an APK on a device, you will include it in the POST body of the request as a binary file.
The path to your APK is the local path on your filesystem.
For example:
Install your app on a device
Request Body
The request's body should include the binary of your apk app. To include the binary of your app, use the <code class="dcode">--data-binary "@<path_to_your_apk>"</code>, for example <code class="dcode">--data-binary "@/Users/headspin/HealthTest.apk"</code>.
Optional Parameters
- <code class="dcode">/v0/adb/{device_id}/install?apk_id=<id></code>: a previously uploaded app id that will be installed on the desired device. Do not pass the apk as a body to the request with --data-binary if this option is used.
Example
Install a local apk file:
Install an apk previously uploaded through the apk api:
Install an xapk previously uploaded through the xapk api:
Response
A JSON object:
<code class="dcode">{ "_headspin_progress": "..", "status": 0, "returncode": 0, "stdout": "Success\n", "summary": "ok"}</code> if the installation was successful.
Uninstall your app from a device
Uninstall
To uninstall an APK you will provide its App Package name in the request.
For example:
Example
Response
A JSON object:
- <code class="dcode">{ "_headspin_progress": ".", "status": 0, "returncode": 0, "stdout": "Success\n", "summary": "ok"}</code> if the uninstall is successful.
- <code class="dcode">{ "_headspin_progress": ".", "status": 0, "returncode": 0, "stdout": , "summary": "ok"}</code> if the uninstall is not successful.
Uninstall an XAPK using its xapk_id
Example
Response
A JSON object:
- <code class="dcode">{ "_headspin_progress": ".", "status": 0, "returncode": 0, "stdout": "Success\n\n", "summary": "ok"}</code> if uninstall is successful.
- <code class="dcode">{ "_headspin_progress": ".", "status": 0, "returncode": 0, "stdout": , "summary": "failed to run"}</code> if uninstall is not successful.