feat(audience-sdk): iOS SKAdNetwork registration on first launch (SDK-307)#747
Merged
feat(audience-sdk): iOS SKAdNetwork registration on first launch (SDK-307)#747
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ba76d07. Configure here.
Base automatically changed from
feat/sdk-308-ios-info-plist-post-processor
to
main
May 7, 2026 03:21
…-307) Calls SKAdNetwork.registerAppForAdNetworkAttribution() via Obj-C++ bridge on the first app launch when config.EnableMobileAttribution is true. Subsequent launches skip the call (PlayerPrefs flag persists per install). Emits skanRegistered: true on the game_launch event only when registration fires. Runtime dispatch avoids a hard StoreKit link and the In-App Purchase capability requirement. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ba76d07 to
6274d79
Compare
ImmutableJeffrey
approved these changes
May 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Summary
_AudienceRegisterSKAN()to the Obj-C++ bridge using runtime dispatch (NSClassFromString) to avoid a hard StoreKit link (which would trigger the In-App Purchase capability and block personal team builds)config.EnableMobileAttribution = true, skipping on subsequent launches via a PlayerPrefs flagskanRegistered: trueongame_launchonly when registration fires (per-install signal — reappears after reinstall, not afterReset())EnableMobileAttributionDepends on
PR #744 (SDK-308 — iOS Info.plist post-processor). Targets that branch so the diff is clean.
Test plan
game_launchcontainsskanRegistered: truegame_launchfires,skanRegisteredabsentSkanRegistrationTests— first launch calls bridge + persists, subsequent launch skipsImmutableAudienceTests— three new cases covering provider returns true/null and disabled flag🤖 Generated with Claude Code
Note
Medium Risk
Adds iOS native/Unity bridging and new
game_launchtelemetry fields gated byEnableMobileAttribution; risk centers on platform-conditional native interop and ensuring the new provider is only invoked when intended.Overview
Adds opt-in iOS SKAdNetwork registration on first launch when
AudienceConfig.EnableMobileAttributionis set, wiring a new Unity-installedMobileAttributionProviderintoImmutableAudience.Initand emittingskanRegistered: trueongame_launchonly when registration fires.Introduces a runtime-dispatched Obj-C++ bridge (
_AudienceRegisterSKAN) to avoid a hard StoreKit link, plus Unity-sideSKANBridge/SkanRegistration(PlayerPrefs-backed “first launch” flag). Updates the sample app UI to expose a Mobile Attribution toggle and expands tests to cover provider behavior and first-launch persistence/ordering.Reviewed by Cursor Bugbot for commit 6274d79. Bugbot is set up for automated code reviews on this repo. Configure here.