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

Merged
merged 2 commits into from
Dec 22, 2022

Conversation

luiges90
Copy link

@luiges90 luiges90 commented Dec 21, 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 merged commit 0126fdb into master Dec 22, 2022
@luiges90 luiges90 deleted the fix/ios-app-tracking-transparency-request branch December 22, 2022 01:23
@luiges90 luiges90 restored the fix/ios-app-tracking-transparency-request branch December 22, 2022 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants