CFBundleIdentifier) or the Android package name. Both operations are
available on iOS Simulator and Android Emulator through the CLI, TypeScript
SDK, and REST API.
Before you start
You need an active session that belongs to the authenticated account, and the app must already be installed on that session. See Run an iOS simulator or Run an Android emulator to create a session and install an app. For CI, the TypeScript SDK, or direct REST calls, create an API key in the dashboard and expose it to the process:Use the CLI
Use the TypeScript SDK
launchApp and terminateApp need @run-cloud/sdk 0.68.0 or newer:
AbortSignal as signal. When the platform is selected
at runtime, use the generic simulator client:
Call the REST API
Platform behavior
Troubleshooting
Errors includeok: false, outer action ("app-launch" or
"app-terminate"), platform, sessionId, and a nested error object with
code, message, retryable, and action, the suggested next step.
SDK failures throw
RunCloudError with status, code, retryable,
platform, sessionId, action, and suggestedAction. The
SIMULATOR_APP_LIFECYCLE_ERROR_CODES export lists the codes above.