- Appearance: light or dark mode.
- Permissions: grant, revoke, or reset camera, location, notifications, and other privacy permissions for one app, so no system prompt interrupts the run.
- Push (iOS): deliver an APNs payload to an app, as if it came from Apple.
Appearance
simctl ui appearance. Android runs cmd uimode night yes|no. Apps
that follow the system setting redraw at once. Some apps read it only at launch.
Permissions
bundleId (iOS) or packageName (Android), one service, and
an action: grant, revoke, or reset. reset returns the permission to
“not asked”, so the app shows its prompt again. The CLI sends one request per
service and stops at the first failure.
On Android the app must be installed and must declare the permission in its
manifest. A grant does not survive an app reinstall.
Push notifications (iOS)
Write an APNs payload with anaps object. The limit is 4 KiB, the same as
APNs.
payload.json
simctl push as data. The app receives it as a
remote notification. Grant notifications first, or the banner does not
appear. A simulated push does not go through APNs, so it does not test your
server’s APNs credentials or device tokens.
Android
POST /run-cloud/android/:id/push returns 501 push_unsupported. Android
apps receive push messages through Firebase Cloud Messaging, and FCM delivery
needs Google Play services on the device. run.cloud does not pretend to deliver
one. To test push on Android, send a real FCM message from your own server to
the app’s registration token, on an emulator image that has Google Play
services.
Responses
A successful reply names the session, device, and lease, and echoes the change:appearance replies carry "appearance": "dark". push replies carry
"push": { "appId": "…", "payloadBytes": 87 }.
Validation
run.cloud checks every value before it reaches the device:mode,service, andactionmust be one of the values listed above.- An app identifier must match
^[A-Za-z0-9._-]{1,255}$. - A push payload must be a JSON object with an
apsobject, at most 4096 bytes.
Errors
Failures returnok: false, action (appearance, permissions, or push),
and error.code: