Permissions Setup for iOS and Android Apps
Configure iOS and Android app permissions in Maestro tests, including camera, location, and other services.
By default, all permissions are set to allow by the launchApp command. It is possible to launch an app with custom permissions behaviour by passing the permissions argument to launchApp:
- launchApp:
permissions:
all: deny
camera: allow
location: allowAvailable permissions
Maestro has standardized names for most permissions.
For example, on Android: bluetooth targets both android.permission.BLUETOOTH_CONNECT and android.permission.BLUETOOTH_SCAN.
calendar
β
β
camera
β
β
contacts
β
β
health
β
β
homekit
β
β
location
β
β
medialibrary
β
β
microphone
β
β
motion
β
β
notifications
β
β
photos
β
β
reminders
β
β
siri
β
β
speech
β
β
usertracking
β
β
bluetooth
β
β
phone
β
β
storage
β
β
sms
β
β
my.custom.permission
β
β
Supporting permission IDs for Android
There are permissions on Android that are not listed in the table above. Use the permission IDs in place of the permission name to set these permissions.
For example, to allow the "add voicemail" permission, use:
- launchApp:
permissions:
com.android.voicemail.permission.ADD_VOICEMAIL: allowAvailable permission names
Every permission can be set to: allow, deny or unset
allow
Permission granted
Permission granted
deny
Permission denied
Permission will be asked during flow run
unset
Permission will be asked during flow run
Permission will be asked during flow run
Some iOS permissions can have other values:
location
always
Same as allow
inuse
Only allow location whilst using the app
never
Same as deny
photos
limited
Allow limited access to photos
Examples
Permissions are set by passing them to the launchApp command as follows:
Deny all permissions
- launchApp:
permissions: { all: deny } Deny all permissions but allow the medialibrary permission
medialibrary permission- launchApp:
permissions:
all: deny
medialibrary: allowDeny all permissions but allow adding voicemails
- launchApp:
permissions:
all: deny
com.android.voicemail.permission.ADD_VOICEMAIL: allowLast updated
Was this helpful?
