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

[PLAT-5155] Improve BugsnagConfiguration behaviour #828

Merged
merged 3 commits into from
Oct 7, 2020

Conversation

nickdowell
Copy link
Contributor

Goal & changes

This change aims to make the BugsnagConfiguration API easier to work with by making the -initWithApiKey: initializer more prominent and deferring checks for the presence of an api key until -[BugsnagClient start] is called.

It also fixes the throwing of an exception if the api key is missing, by ensuring an NSException is thrown rather than a string - which ensures a message is logged in the app developer's Xcode console. As Apple's documentation says - "Cocoa applications should @throw only NSException objects"

Design

This approach was chosen to avoid making any API breaking changes, and make our APIs more intuitive to work with, as discussed in PLAT-5155

Testing

This is covered by e2e and unit tests, which have been updated to cater for the changed runtime behaviour.

@nickdowell nickdowell marked this pull request as ready for review October 7, 2020 07:34
@nickdowell nickdowell merged commit cdeddf7 into next Oct 7, 2020
@nickdowell nickdowell deleted the api-key-validation branch October 7, 2020 07:34
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