Tap on IOS App tracking transparency permission dialog
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?
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?
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.
Well, that's strange... I don't know then. Maybe try com.apple.Preferences?
same result for appId: 'com.apple.Preferences'
We should find a way to make it work and document it.
A similar case is #1324.
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.
We can add this dialog to await $.native.grantPermissionWhenInUse(); / deny