Skip to content

Commit

Permalink
docs: address com.apple.ContactsUI.LimitedAccessPromptView in trouble…
Browse files Browse the repository at this point in the history
…shooting (#2474)

* docs: address com.apple.ContactsUI.LimitedAccessPromptView in troubleshooting

* Update troubleshooting.md

* Update troubleshooting.md
  • Loading branch information
KazuCocoa authored Sep 19, 2024
1 parent e7095d5 commit 7419f29
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/guides/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,25 @@ XCUITest driver offers a couple of approaches to handle them:

[`mobile: activeAppInfo`](../reference/execute-methods.md#mobile-activateappinfo) helps to understand what application (bundleId) is considered as active for the XCUITest driver.

## Interact with dialogs managed by `com.apple.ContactsUI.LimitedAccessPromptView`

iOS 18 introduced a new process named `com.apple.ContactsUI.LimitedAccessPromptView`. See [this issue](https://github.com/appium/appium/issues/20591) for more details.
As of XCUITest driver v7.26.4, the only workaround to interact with views available through the process is the below method:

- `defaultActiveApplication` setting in [Settings](../reference/settings.md).
- e.g. With the [Appium Ruby client](https://github.com/appium/ruby_lib_core)
```ruby
# Interacting with the test target
driver.settings.update({defaultActiveApplication: "com.apple.ContactsUI.LimitedAccessPromptView"})
# to accept the alert
driver.find_element("accessibility_id", "Select Contacts").click
driver.settings.update({defaultActiveApplication: "auto"})
# keep interacting with the test target
```

The `com.apple.ContactsUI.LimitedAccessPromptView` process can get elements available through `com.apple.springboard`, such as several system permission dialogs.
iOS 18+ devices may be possible to use `com.apple.ContactsUI.LimitedAccessPromptView` to interact with elements managed either by `com.apple.ContactsUI.LimitedAccessPromptView` or `com.apple.springboard`.

## Leftover Application Data on Real Devices

There might be a situation where application data is present on the real device, even if the
Expand Down

0 comments on commit 7419f29

Please sign in to comment.