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 for iOS Application Installed event #56

Merged
merged 5 commits into from
Aug 20, 2022

Conversation

b099l3
Copy link
Contributor

@b099l3 b099l3 commented Aug 15, 2022

Context

This PR is a workaround fix for the Application Installed events not firing when setting the config via dart and not via a file (info.plist), issue #26.

Fix Details:

Due to the method sequence and the way the native library works, described here, we need to either call the dart code Segment.config() in didFinishLaunchingWithOptions(), similar to how the configFromFile works or send the Application Installed event when we call the dart code Segment.config().

As I dont think there is an easy way to call Segment.config() in the native code didFinishLaunchingWithOptions(), I have instead opted to add a similar method to the way the native code works when sending Application Installed / Application Updated events, this code is here.

This will make use of the same NSUserDefaults keys as the native library and manually send the events.

This maybe isn't the best way to explain this fix so happy to chat. Also keep up the good work 💙.

@b099l3
Copy link
Contributor Author

b099l3 commented Aug 15, 2022

I have tested this and can see the events being fired
image

@danielgomezrico danielgomezrico self-requested a review August 20, 2022 15:14
Copy link
Contributor

@danielgomezrico danielgomezrico left a comment

Choose a reason for hiding this comment

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

Thanks for this PR, looks good to me

@danielgomezrico danielgomezrico merged commit 1aea5eb into la-haus:master Aug 20, 2022
@b099l3 b099l3 deleted the feature/install-event-ios branch August 20, 2022 15:33
@b099l3 b099l3 restored the feature/install-event-ios branch August 23, 2022 10:37
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