OneSignal-iOS-SDK
OneSignal-iOS-SDK copied to clipboard
Iam/remove iam caching
Description
One Line Summary
Removes IAM caching (follow up on #1486).
Details
We should not cache IAMs since it is incongruent with RYW consistency.
Example: there is an IAM targeting users on version 1.0. The user upgrades to 2.0 & should no longer see the IAM targeting 1.0.
The source of truth is the backend & we should only show IAMs as calculated by segment membership.
Testing
Manual testing
Tested in simulator with an IAM that shows on app certain versions.
Additional scenarios:
- tested every time conditions are satisfied
- tested with trigger
Affected code checklist
- [ ] Notifications
- [ ] Display
- [ ] Open
- [ ] Push Processing
- [ ] Confirm Deliveries
- [ ] Outcomes
- [ ] Sessions
- [x] 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
- [ ] 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
- Only removing code. No existing coverage.
- [ ] 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.