-
Notifications
You must be signed in to change notification settings - Fork 130
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
add configuration option to persist user information between launches #469
Closed
robinmacharg
wants to merge
12
commits into
spec-compliance
from
robinmacharg/Add-Configuration-option-to-persist-user-information-between-launches
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… config metadata, added tests SSKeychain commit: samsoffes/sskeychain@e3736a3). Removed 2x erroneous @param doc string from SSKeychain.h. Adjusted podspec.
… config metadata, added tests SSKeychain commit: samsoffes/sskeychain@e3736a3). Removed 2x erroneous @param doc string from SSKeychain.h. Adjusted podspec.
…nformation-between-launches' of github.com:bugsnag/bugsnag-cocoa into robinmacharg/Add-Configuration-option-to-persist-user-information-between-launches
kattrali
suggested changes
Feb 25, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of top level things:
- The podspec should include Security framework in
frameworks
- Vendoring the dependency is fine, but the top level symbols will need to be prefixed in case someone's podspec also includes the same library. A quick glance says those would be an enum, a few string constants, and the class name
Thanks for the feedback.
This was added previously in this commit.
Thanks for the info; TIL: "Vendoring". Done. |
…tion-to-persist-user-information-between-launches
… persistence setup handling
…e build file warning
…tion-to-persist-user-information-between-launches
robinmacharg
deleted the
robinmacharg/Add-Configuration-option-to-persist-user-information-between-launches
branch
February 28, 2020 16:53
14 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Goal
Add persistence of set user info (id, email, name) between notifier instantiation.
Design
This stores the three pieces of info in the keychain to assuage any privacy/security concerns (primarily desktop since mobile devices are typically single user). SSKeychain is used for keychain access to simplify the notifier code.
Persisted (or deleted) user data operations percolate to
BugsnagConfiguration.metadata
appropriately.Atomicity of operation has been ensured via
@synchronized
.In
persistUserData()
the simplicity and readability ofif/then/else
has been preferred over the terseness (and, questionably, elegance) of a ternaries'?:
.There has been significant discussion around how to test this feature. See below.
Changeset
BugsnagConfiguration
SSKeychain
source filesTests
Unit tests fail due to missing entitlements. Entitlements - required for Keychain access - are only generated for applications, not libraries/frameworks. Adding a separate stub application to associate with the unit tests was deemed the incorrect approach due to potential issues over signing, and failing preexisting tests. The test functionality was instead moved into CI tests. The unit tests were left in place, heavily documented (and commented-out appropriately) to highlight this issue and to assert test coverage where it is known for a fact. The CI project (maze-runner) also received a small update to add a missing assertion.
SSKeychain
was not tested due to its maturity and prior use.Review
Outstanding Questions
master
for fixes,next
forfeatures)