patrol icon indicating copy to clipboard operation
patrol copied to clipboard

Tap on IOS App tracking transparency permission dialog

Open arashgm opened this issue 3 years ago • 7 comments

i am trying to tap on IOS App tracking transparency permission dialog(https://www.inovex.de/de/blog/app-tracking-transparency-and-idfa-in-ios-14-5/) , tried two different approaches but no success :

await $.native.grantPermissionWhenInUse(); (this works for notification permission)

await $.native.tap(
  Selector(text: 'Allow'),
  appId: 'xxx',
);

is there a different way to handle that dialog?

arashgm avatar Nov 16 '22 16:11 arashgm

You have to use com.apple.springboard for appId, because that dialog belongs to it.

Let me know if that helps.

but no success

What does it mean? Is the test failing? WIth what message? Are you using patrol drive?

bartekpacia avatar Nov 16 '22 17:11 bartekpacia

thanks for the hint for the bundle id, tried the com.apple.springboard but no tapping happens , by no success i meant tapping is not happening , test fails and dialog remain visible. i am using patrol drive.

arashgm avatar Nov 16 '22 17:11 arashgm

Well, that's strange... I don't know then. Maybe try com.apple.Preferences?

bartekpacia avatar Nov 16 '22 18:11 bartekpacia

same result for appId: 'com.apple.Preferences'

arashgm avatar Nov 17 '22 08:11 arashgm

We should find a way to make it work and document it.

A similar case is #1324.

bartekpacia avatar Jul 02 '23 09:07 bartekpacia

Our team was struggling with this for couple of days and seeing this issue open was raising doubts as well.

After lot of hit and tries, below combination worked to click on the Allow button on App Tracking Transparency dialog

 $.native.tap(
        Selector(textContains: 'Allow'),
        appId: 'com.apple.springboard',
        timeout: const Duration(seconds: 10),
      )

So for me, textContains instead of text did the trick.

Commenting as this could save someone's day.

bharwanisk avatar Aug 22 '24 15:08 bharwanisk

We can add this dialog to await $.native.grantPermissionWhenInUse(); / deny

Kendru98 avatar Aug 01 '25 07:08 Kendru98