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

Initialize storage before generating anonymous ID. #615

Merged
merged 1 commit into from
Oct 10, 2016
Merged

Conversation

f2prateek
Copy link
Contributor

@f2prateek f2prateek commented Oct 10, 2016

Since 3.5.0 (https://github.com/segmentio/analytics-ios/pull/592/files), a regression was introduced as part of the crypto changes
that would cause a new anonymous ID to be generated for every launch of
the app.

This change fixes that regression.

Since 3.5.0, a regression was introduced as part of the crypto changes
that would cause a new anonymous ID to be generated for every launch of
the app.

This change fixes that regression.
@tonyxiao
Copy link
Contributor

tonyxiao commented Oct 22, 2016

@f2prateek if we used Swift for the core library this issue would have been caught by the compiler. Unfortunately we are not able to use Swift in the core library, but are there other ways this type of issues (nil pointer access silently dropped) could have been caught by maybe using nullability indicator?

Unfortunately sending a message to nil is one of the most common kind of bugs on iOS because it is just so easy to make :( And it looks like we got hit by it. http://stackoverflow.com/questions/156395/sending-a-message-to-nil

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