Skip to content

feat(ios): support permissions for multiple apps - #1019

Open
alvar-bolt wants to merge 1 commit into
MarathonLabs:developfrom
alvar-bolt:alvar/codex/multi-app-ios-permissions
Open

alvar-bolt wants to merge 1 commit into
MarathonLabs:developfrom
alvar-bolt:alvar/codex/multi-app-ios-permissions

Conversation

@alvar-bolt

Copy link
Copy Markdown

Summary

Adds support for granting iOS simulator permissions to additional applications by bundle identifier.

Today permissions.grant only applies to the application under test. This change preserves that behavior and adds an optional permissions.applications map so test farms can pre-grant permissions to system or companion apps, for example Apple Maps, before running UI tests.

All permission grants use the existing top-level permissions.lifecycle.

Motivation

We have UI tests that launch Apple Maps. Apple Maps immediately requests permissions, and today Marathon can only pre-grant permissions for the application under test.

Those tests are expected to handle/grant that access themselves, but if that path fails for any reason, the simulator can be left with an Apple Maps permission alert still open. That leaks state into the environment and can cause following test runs on the same simulator to fail.

This change lets us pre-grant permissions for Apple Maps through Marathon config, avoiding that cross-run simulator state leak.

Example

permissions:
  lifecycle: BEFORE_TEST_RUN
  grant:
    - contacts
  applications:
    com.apple.Maps:
      grant:
        - location

Preserve the existing permissions.grant behavior for the application under test while allowing per-bundle grants with optional lifecycle overrides.\n\nThis lets simulator test farms pre-grant system applications such as Apple Maps before each batch and avoid cross-test permission prompts.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant