OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your native iOS app with OneSignal. https://onesignal.com
Update fetch IAMs to use the new endpoint, support JWT, and include the alias.
Details
Motivation
Fetch IAMs
Scope
Fetch IAMs
Future Work
The user and subscription model's relationship should be improved. Should the subscription model own a reference to its identity model that owns it?
The retrying fetch IAMs can be improved and less hacky.
Testing
Unit testing
No changes
Manual testing
New install with JWT on and off, misc scenarios tested
Works under normal flows with connection.
With JWT on, receive a 401 from fetch IAM. Then update the jwt token, and see the fetch that is immediately retried.
With JWT off, login to a new user with network turned off, and start a new session. Fetch IAM is blocked by null onesignal ID. Turn data on and the user is created. The fetch IAM is immediately retried.
Affected code checklist
[ ] Notifications
[ ] Display
[ ] Open
[ ] Push Processing
[ ] Confirm Deliveries
[ ] Outcomes
[ ] Sessions
[x] In-App Messaging
[ ] REST API requests
[ ] Public API changes
Checklist
Overview
[ ] I have filled out all REQUIRED sections above
[ ] 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
[ ] Any Public API changes are explained in the PR details and conform to existing APIs
Testing
[ ] I have included test coverage for these changes, or explained why they are not needed
[ ] All automated tests pass, or I explained why that is not possible
[ ] I have personally tested this on my device, or explained why that is not possible
Final pass
[ ] 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.
[ ] 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 fetch IAMs to use the new endpoint, support JWT, and include the alias.
Details
Motivation
Fetch IAMs
Scope
Fetch IAMs
Future Work
Testing
Unit testing
No changes
Manual testing
New install with JWT on and off, misc scenarios tested
null
onesignal ID. Turn data on and the user is created. The fetch IAM is immediately retried.Affected code checklist
Checklist
Overview
Testing
Final pass
This change is