-
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
Convert event.app from NSDictionary to a structured class #520
Conversation
ae67b46
to
554956a
Compare
554956a
to
6638699
Compare
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.
From what I understand, looks good. And 68% coverage on unit tests, which is definitely going in the right direction! Couple of in-line comments, mostly opinionated nits over formatting.
Is it worth putting new structured containers in a group in XCode to make working with them easier? Assuming that the podspec needs updated to match any folder nesting. The list of files is now considerable (i.e. more than a screen-full). Failing that the new additions should be arranged alphabetically in XCode.
This is definitely worth doing - I'll raise a separate PR to address this. |
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.
Looking good.
Goal
Converts
event.app
from anNSDictionary
to a structured class where each field is represented as a property.BugsnagApp
is used for sessions, and contains stateless properties that do not change over the lifecycle of an application.BugsnagAppWithState
extends this class and is used for events, and contains stateful properties that change for each error - e.g. durationInForeground.Changeset
BugsnagApp
andBugsnagAppWithState
classes with properties for each field in the specBugsnagConfiguration
to have a default value forappType
, rather than parsing in theBugsnagEvent
BugsnagEvent
to use readonlyBugsnagAppWithState
forevent.app
BSGParseApp
andBSGParseAppWithState
methods into newBugsnagApp
classes, so that they can parse a KSCrash report and populate their fieldsBugsnagApp/WithState
fromBugsnagEvent
app.name
as it is the same asapp.id
Tests
BugsnagApp
andBugsnagAppWithState
populate correctly, and that they serialize JSON correctly