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

Fix App Tracking Transparency request may fail to show. #967

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

luiges90
Copy link

@luiges90 luiges90 commented Dec 22, 2022

✨ What kind of change does this PR introduce? (Bug fix, feature, docs update...)

Fix App Tracking Transparency authorization prompt may fail to show in iOS, due to iOS not showing the prompt unless the app is in an Active state. This often happens when multiple permissions are requested and App Tracking Transparency come after any other authorization prompts.

⤵️ What is the current behavior?

When multiple permissions are requested at once (at client level), and App Tracking Transparency is in the middle of those permissions, the authorization prompt for App Tracking Transparency does not show and the plugin simply return "Denied" as permission authorization state.

🆕 What is the new behavior (if this is a feature change)?

When multiple permissions are requested at once, App Tracking Transparency authorization request will first wait until the app is active again. This would normally happen after the last permission authorization request is dismissed. If the app is already in active state, App Tracking Transparency authorization will be asked immediately.

💥 Does this PR introduce a breaking change?

No.

🐛 Recommendations for testing

Use this code on client, and run it on iOS devices.

Permission.notification.request();
Permission.appTrackingTransparency.request();

📝 Links to relevant issues/docs

🤔 Checklist before submitting

  • I made sure all projects build.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
  • I updated CHANGELOG.md to add a description of the change.
  • I followed the style guide lines (code style guide).
  • I updated the relevant documentation.
  • I rebased onto current master.

@luiges90 luiges90 changed the title Fix/ios app tracking transparency request Fix App Tracking Transparency request may fail to show. Dec 22, 2022
@moesaid
Copy link

moesaid commented Mar 27, 2023

is this going to be merged ?

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.

2 participants