Fix requiring privacy consent blocks confirmed deliveries indefinitely #1541
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
One Line Summary
Setting consent required and then providing consent still blocked confirmed deliveries from being sent - this PR fixes that.
Details
The consent required value was being written to / read from the shared user defaults but the consent granted value was written to / read from standard user defaults (which is not accessible to the NSE).
This PR also fixes a migration bug (and creates more migrations to fix that and fix the bug in this PR) that arose after modularizing the SDK.
Motivation
Reported by customers, and we should send confirmed deliveries once consent is granted.
Scope
Testing
Unit testing
None added, little infrastructure
Manual testing
iPhone 13 with iOS 18.1
Fix the bug in this PR
main
, set consent required, and then provide consentFix the existing migration bug
2.0.0
and the new version is5.2.10
.OSOutcomes
2.0.0
is read from cache to determine if migration is needed, and the new SDK version is cached. Outcomes is migrated now.5.2.10
and does not do a migration, even if it is necessary. The migration controller invokes in app messages to migrate.Affected code checklist
Checklist
Overview
Testing
Final pass
This change is