capacitor-plugin-app-tracking-transparency
capacitor-plugin-app-tracking-transparency copied to clipboard
Before clicking on "Allow" or "Don't Allow," it's giving the status, but after clicking on any option, it's not receiving the status.
Please check this repo- https://github.com/vipinsaini0/app-tracking-transparency
@mahnuh I'm still facing the same issue. Before clicking on "Allow" or "Don't Allow," it's giving the status, but after clicking on any option, it's not receiving the status.
Originally posted by @vipinsaini0 in https://github.com/mahnuh/capacitor-plugin-app-tracking-transparency/issues/18#issuecomment-2099794842
@mahnuh Exactly the same issue I faced yesterday. Initially requestPermission method return status 'denied' before choosing one of the options Allow/Ask App Not to Track, but even after choosing it doesn't return status
@mahnuh Exactly the same issue I faced yesterday. Initially requestPermission method return status 'denied' before choosing one of the options Allow/Ask App Not to Track, but even after choosing it doesn't return status
yes right @altaidyn00
@mahnuh can you please check this issue on priority as I'm stuck duo to Apple AppTrackingTransparency without it app will be reject(attached Repo — #https://github.com/vipinsaini0/app-tracking-transparency
)
@vipinsaini0 sorry, I'm maintaining this free plugin in my spare time and paying the bills takes priority for me. It looks like it is working fine for me and a lot of other people. @altaidyn00 can you provide a repo as well? I can try to have a look sometime next week I guess.
okay
Can you provide a link to the fork please? As I said I will try to have a look sometime next werk.
Had some time this evening and had a look. The fix you proposed from the other repo did not work. However I was able to fix it and just published a pre-release to npm. Can you please verify that this solves the issue for you @vipinsaini0 @altaidyn00? Just install capacitor-plugin-app-tracking-transparency@next
.
If it works for you I'll merge and publish it.
@mahnuh I have the same problem and tested capacitor-plugin-app-tracking-transparency@next
, but the issue stays the same. The response of await AppTrackingTransparency.requestPermission()
is not awaited, the Promise is resolved to early ...
I'm currently using Capacitor 6.1.0 on iOS 17.5.1.
@mahnuh I further investigated the issue and found a hint: https://stackoverflow.com/a/69373506/7558802
I fixed the issue by adding a timeout before calling AppTrackingTransparency.requestPermission()
, although I'm also awaiting the platform.ready()
event before. Seems like a timing issue related to applicationDidBecomeActive
...
Hi @thoechtl, can you please provide a repo where I can reproduce this issue? Also please check out this demo project and verify if things are working fine there. For me they are.
The fix from @next already has been released with v2.0.5.
Hi @mahnuh, a demo repo to reproduce the issue can be found here: https://github.com/thoechtl/capacitor-plugin-app-tracking-transparency-demo-app
The issue exists if you request tracking permission right after geolocation permission:
const geoResponse = aawait Geolocation.requestPermissions({ permissions: ['location'] });
...
const response = await AppTrackingTransparency.requestPermission();
But there are two simple workarounds: make a small timeout between the request or just change order ...
Thanks for this useful plugin :-)