Skip to content

Change validation to identify once and track app is installed #45

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

Merged
merged 2 commits into from
Dec 19, 2023

Conversation

edsonjab
Copy link
Contributor

Fix #42

"build": context.app.build,
});
} else if (context.app.version != previousContext.app.version) {
if (context.app.version != previousContext.app.version) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't really fix the Application Installed event not being triggered as this is the only place where this is tracked.

I think the solution should either be:

  • Change the initialization of context so that it is null at this point. Then we can call the native function to fill the values.
  • Do a different check at this point to see if the app is just installed. f.e. instead of checking context we can persist a flag.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only concern with changing the initialization of Context would be concurrency issues. Specially with plugins like IDFA, AdvertisingID. Not 100% sure if any plugin might be expecting context to be populated from the get-go and hence why it is initialized right away.

The second solution might be simpler and more sound.

@edsonjab edsonjab changed the title Remove validation to identify once and track app is installed Change validation to identify once and track app is installed Dec 19, 2023
@chrisradek chrisradek changed the base branch from main to app_lifecycle_fix December 19, 2023 19:27
@chrisradek chrisradek merged commit 05290ee into segmentio:app_lifecycle_fix Dec 19, 2023
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.

Lifecycle events not sent
3 participants