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: Don't report two app open events at initial launch #494

Merged
merged 1 commit into from
Apr 20, 2024

Conversation

crleona
Copy link
Collaborator

@crleona crleona commented Apr 19, 2024

Summary

UIApplicationWillEnterForegroundNotification fires both at initial launch and when returning from the background. Because we were using a different notification (UIApplicationDidFinishLaunchingNotification) to detect if the app open was from the background, we effectively were firing the event twice. Instead, rely on UIApplicationState to determine if we were opened from the background.

Checklist

  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?: No

@crleona crleona requested a review from a team April 19, 2024 23:54
@crleona crleona force-pushed the AMP-98172-fix-double-app-open branch from 527c963 to 88a21c4 Compare April 20, 2024 00:22
@crleona crleona merged commit 8bf7c7e into main Apr 20, 2024
2 checks passed
@crleona crleona deleted the AMP-98172-fix-double-app-open branch April 20, 2024 00:36
Copy link

🎉 This PR is included in version 8.19.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants