Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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. #22

Open
vipinsaini0 opened this issue May 9, 2024 · 12 comments

Comments

@vipinsaini0
Copy link

          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.

Screenshot 2024-05-08 at 10 00 30 AM

Originally posted by @vipinsaini0 in #18 (comment)

@vipinsaini0 vipinsaini0 changed the title Please check this repo- https://github.com/vipinsaini0/app-tracking-transparency 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. May 9, 2024
@altaidyn00
Copy link

@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

@vipinsaini0
Copy link
Author

@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

@vipinsaini0
Copy link
Author

@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)

@mahnuh
Copy link
Owner

mahnuh commented May 10, 2024

@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.

@vipinsaini0
Copy link
Author

okay

@mahnuh
Copy link
Owner

mahnuh commented May 10, 2024

Can you provide a link to the fork please?
As I said I will try to have a look sometime next werk.

@mahnuh
Copy link
Owner

mahnuh commented May 10, 2024

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.

@thoechtl
Copy link

@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.

@thoechtl
Copy link

@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 ...

@mahnuh
Copy link
Owner

mahnuh commented Aug 27, 2024

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.

@mahnuh
Copy link
Owner

mahnuh commented Aug 27, 2024

The fix from @next already has been released with v2.0.5.

@thoechtl
Copy link

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 :-)

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

No branches or pull requests

4 participants