Skip to content

Commit

Permalink
Publish docs version 20.x
Browse files Browse the repository at this point in the history
  • Loading branch information
mobile1-internal committed Jan 14, 2024
1 parent 3d7cb5d commit b42fd39
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions website/versioned_docs/version-20.x/api/device.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,31 @@ Grants or denies runtime permissions to your application. This will cause the ap
await device.launchApp({permissions: {calendar: 'YES'}});
```
Detox uses [AppleSimUtils](https://github.com/wix/AppleSimulatorUtils) to implement this functionality for iOS simulators. Read about the different types of permissions and how to set them in AppleSimUtils' documentation and by checking out Detox’s [own test suite](https://github.com/wix/Detox/tree/a9a09246c05733f6b91cfcc0dba05a4714abca92/detox/test/e2e/13.permissions.test.js).
Detox uses [AppleSimUtils](https://github.com/wix/AppleSimulatorUtils) and [`xcrun simctl`](https://nshipster.com/simctl/) to implement this functionality for iOS simulators.
Please make sure you have the most recent version of both tools installed, since we rely on their latest versions.
##### Supported Permissions
| Permission | Values | Notes |
|------------|-------------------------|---------------------------------------------------------------|
| location | always / inuse / never / unset | inuse - provides location access only when the app is in use |
| contacts | YES / NO / unset / limited | limited - grants limited access to contacts |
| photos | YES / NO / unset / limited | limited - grants limited access to photos |
| calendar | YES / NO / unset | |
| camera | YES / NO / unset | |
| medialibrary | YES / NO / unset | |
| microphone | YES / NO / unset | |
| motion | YES / NO / unset | |
| reminders | YES / NO / unset | |
| siri | YES / NO / unset | |
| notifications | YES / NO / unset | Requires AppleSimUtils; unsupported by simctl |
| health | YES / NO / unset | Requires AppleSimUtils; unsupported by simctl |
| homekit | YES / NO / unset | Requires AppleSimUtils; unsupported by simctl |
| speech | YES / NO / unset | Requires AppleSimUtils; unsupported by simctl |
| faceid | YES / NO / unset | Requires AppleSimUtils; unsupported by simctl |
| userTracking | YES / NO / unset | Requires AppleSimUtils; unsupported by simctl |
Check Detox's [own test suite](https://github.com/wix/Detox/blob/master/detox/test/e2e/13.permissions.test.js) for usage examples.
#### 3. `url`—Launching with URL
Expand Down Expand Up @@ -315,7 +339,7 @@ Check out Detox’s [own test suite.](https://github.com/wix/Detox/tree/a9a09246
Sets the simulator/emulator location to the given latitude and longitude.
> On iOS `setLocation` is dependent on [`fbsimctl`](https://github.com/facebook/idb/tree/4b7929480c3c0f158f33f78a5b802c1d0e7030d2/fbsimctl) which [is now deprecated](https://github.com/wix/Detox/issues/1371). If `fbsimctl` is not installed, the command will fail, asking for it to be installed.
> On iOS `setLocation` depends on `xcrun simctl`, and we recommend using its latest version.
>
> On Android `setLocation` will work with both Android Emulator (bundled with Android development tools) and Genymotion. The correct permissions must be set in your app manifest.
Expand Down

0 comments on commit b42fd39

Please sign in to comment.