OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your Xamarin app with OneSignal. https://onesignal.com
Update iOS Initialization to register callbacks after instantiation of OneSignalImplementation, rather than during instantiation.
Details
Motivation
Fixes #368
This change keeps the same ordering of initialization. It simply moves the registration of the callbacks to be in OneSignalImplementation.Initialize rather than in the OneSignalImplementation constructor. By postponing registration slightly, the instance of OneSignalImplementation has been fully initialized, and _instance properly set.
Scope
iOS initialization. No functional changes expected.
Testing
Manual testing
Brought up the iOS sample app on a real device and ensure everything was initialized correctly. Drove permission changes to ensure the permission callback was still being called, assumption being if this one was called back then all others will still work as well.
Affected code checklist
[ ] Notifications
[ ] Display
[ ] Open
[ ] Push Processing
[ ] Confirm Deliveries
[ ] Outcomes
[ ] Sessions
[ ] In-App Messaging
[ ] REST API requests
[ ] Public API changes
Checklist
Overview
[x] I have filled out all REQUIRED sections above
[x] PR does one thing
If it is hard to explain how any codes changes are related to each other then it most likely needs to be more than one PR
[x] Any Public API changes are explained in the PR details and conform to existing APIs
Testing
[x] I have included test coverage for these changes, or explained why they are not needed
[x] All automated tests pass, or I explained why that is not possible
[x] I have personally tested this on my device, or explained why that is not possible
Final pass
[x] Code is as readable as possible.
Simplify with less code, followed by splitting up code into well named functions and variables, followed by adding comments to the code.
[x] I have reviewed this PR myself, ensuring it meets each checklist item
WIP (Work In Progress) is ok, but explain what is still in progress and what you would like feedback on. Start the PR title with "WIP" to indicate this.
Description
One Line Summary
Update iOS Initialization to register callbacks after instantiation of
OneSignalImplementation
, rather than during instantiation.Details
Motivation
Fixes #368 This change keeps the same ordering of initialization. It simply moves the registration of the callbacks to be in
OneSignalImplementation.Initialize
rather than in theOneSignalImplementation
constructor. By postponing registration slightly, the instance ofOneSignalImplementation
has been fully initialized, and_instance
properly set.Scope
iOS initialization. No functional changes expected.
Testing
Manual testing
Brought up the iOS sample app on a real device and ensure everything was initialized correctly. Drove permission changes to ensure the permission callback was still being called, assumption being if this one was called back then all others will still work as well.
Affected code checklist
Checklist
Overview
Testing
Final pass
This change is