Skip to content

SDK-1052: Replace the mobile attribution scripting define with a build settings checkbox - #832

Merged
nattb8 merged 1 commit into
mainfrom
feat/sdk-1052-mobile-attribution-checkbox
Sep 25, 2026
Merged

nattb8 merged 1 commit into
mainfrom
feat/sdk-1052-mobile-attribution-checkbox

Conversation

@nattb8

@nattb8 nattb8 commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator

What

  • Adds two checkboxes (iOS, Android) to the existing AudienceMobileBuildSettings asset that read and write the AUDIENCE_MOBILE_ATTRIBUTION scripting define directly on Player Settings
  • The checkboxes are not serialized fields, they reflect the real Player Settings state live every time the asset is opened, so a define set the old manual way already shows correctly and nothing resets on upgrade
  • Removes three copies of the same define-check method, one per iOS post-processor, in favour of one shared MobileAttributionDefine helper
  • Adds tests for the pure add/remove logic, without touching real Player Settings (that would trigger a mid-test script recompile)

Why

Turning on mobile attribution meant typing an exact define string into Player Settings by hand, once per platform, with no feedback if you got it wrong or forgot a platform. This replaces that with a checkbox on the same asset studios already configure for tracking usage description and SKAdNetwork IDs.

Test plan

  • Manually verified in the Unity Editor: checkboxes render, reflect existing manually-set defines correctly, and toggling one only changes that platform (confirmed via a live before/after diff of ProjectSettings.asset, Android define cleared while iOS stayed untouched)
  • Automated EditMode test run, blocked locally by a Unity batch-mode license activation issue unrelated to this change, tests should be run in CI or manually via Test Runner as part of review

Ticket: SDK-1052

🤖 Generated with Claude Code

…sset

Replaces the manual "type AUDIENCE_MOBILE_ATTRIBUTION into Player
Settings" step with two checkboxes (iOS, Android) on the existing
AudienceMobileBuildSettings asset. The checkboxes read and write the
real scripting define directly, nothing is cached or serialized, so
a define set manually before this change still shows correctly and
nothing resets on upgrade.

Also removes three copies of the same define-check method, one per
iOS post-processor, in favour of a single shared helper.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@nattb8
nattb8 force-pushed the feat/sdk-1052-mobile-attribution-checkbox branch from af00dd8 to 4ebb172 Compare September 25, 2026 00:21
@github-actions

Copy link
Copy Markdown

Audience SDK — Build Size

Platform SDK Size Change
Android 0.39 / 20.00 MB +0.03 MB ✅
Windows 0.17 / 20.00 MB +0.01 MB ✅
iOS 8.60 / 20.00 MB +0.09 MB ✅
macOS 1.00 / 20.00 MB +0.10 MB ✅

SDK Size = build minus empty app. Change = vs baseline. Fails if any platform exceeds its absolute size limit.

@nattb8
nattb8 marked this pull request as ready for review September 25, 2026 00:58
@nattb8
nattb8 requested review from a team as code owners September 25, 2026 00:58
@nattb8
nattb8 merged commit ec1a285 into main Sep 25, 2026
67 of 75 checks passed
@nattb8
nattb8 deleted the feat/sdk-1052-mobile-attribution-checkbox branch September 25, 2026 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants