Skip to content

fix(audience-sdk): gate iOS attribution providers behind AUDIENCE_MOBILE_ATTRIBUTION (SDK-347)#774

Merged
nattb8 merged 1 commit into
mainfrom
feat/sdk-347-ios-attribution-define-gate
May 12, 2026
Merged

fix(audience-sdk): gate iOS attribution providers behind AUDIENCE_MOBILE_ATTRIBUTION (SDK-347)#774
nattb8 merged 1 commit into
mainfrom
feat/sdk-347-ios-attribution-define-gate

Conversation

@nattb8
Copy link
Copy Markdown
Collaborator

@nattb8 nattb8 commented May 12, 2026

Summary

  • Adds AUDIENCE_MOBILE_ATTRIBUTION to the iOS provider registration guard in AudienceUnityHooks.cs
  • Without this fix, iOS builds could collect ATT status and IDFA at runtime when AUDIENCE_MOBILE_ATTRIBUTION was not set, while the privacy manifest still declared NSPrivacyTracking = false — an App Store rejection risk
  • Both platforms now require the define before any attribution provider is registered, making iOS and Android symmetric and matching the documented two-gate model

Test plan

  • Build an iOS project without AUDIENCE_MOBILE_ATTRIBUTION set — verify attStatus, idfa, and skanRegistered are absent from game_launch
  • Build an iOS project with AUDIENCE_MOBILE_ATTRIBUTION + EnableMobileAttribution = true — verify attribution signals are present as before
  • Existing unit tests pass (they drive providers via test seams, not through AudienceUnityHooks)

Closes SDK-347

🤖 Generated with Claude Code

…ILE_ATTRIBUTION (SDK-347)

Without this define, iOS could collect ATT status and IDFA at runtime even
when AUDIENCE_MOBILE_ATTRIBUTION was not set, producing a mismatch between
runtime behaviour and the privacy manifest (NSPrivacyTracking = false while
IDFA was being collected). Both platforms now require the define before any
attribution provider is registered, matching the documented two-gate model.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@nattb8 nattb8 requested review from a team as code owners May 12, 2026 01:54
@nattb8 nattb8 merged commit 94daeb7 into main May 12, 2026
37 checks passed
@nattb8 nattb8 deleted the feat/sdk-347-ios-attribution-define-gate branch May 12, 2026 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants