Files
purchases-ios/Sources/SubscriberAttributes
Rick 377064a7ee Sync ATT consent status on attribute sync (#6485)
* Sync ATT consent status on attribute sync

$attConsentStatus was previously only sent inline during receipt posts,
meaning it was never synced unless a purchase occurred. This caches the
current ATT status as a subscriber attribute on every attribute sync
(foreground, background, login, logout) and before every receipt post,
so it reaches the backend even without a purchase.

Change detection is handled by storeAttributeLocallyIfNeeded — no new
network calls unless the value actually changed.

* Implemented PR feedback

* Ignoring ATTStatus in SubscriberAttributes tests and testing in separate ATTConsentStatusIntegrationTests

* Fix potential race condition in refreshATTStatusAndGetUnsyncedAttributes and use helper property for ATT filtering

* Move assertion inside completion block in testNothingToSyncBesidesATTConsentStatus

* Update doc comments on setATTConsentStatus methods
2026-03-24 08:46:22 +01:00
..