[SDK-1001] Add consent debug settings support - #7
Draft
Khrolovich wants to merge 9 commits into
Draft
Conversation
ConsentManager.Instance.SetDebugSettings(ConsentDebugSettings) lets a publisher test the consent form of another region without a VPN. The DTO carries a ConsentDebugGeography (Eea, RegulatedUsState, Other -- Google's DebugGeography values) and an optional list of test device ids; null clears a previous value. The natives apply it only in a debuggable build on an emulator, simulator or registered device and log why otherwise. SDK-1001 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Build com.appodeal.consent.ConsentDebugSettings from the DTO and pass it to ConsentManager.setDebugSettings. A null DTO is forwarded as a null argument: Unity resolves the single overload through its java.lang.Object placeholder match (ReflectionHelper scores any reference parameter for it). SDK-1001 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
One entry point, CMPUnityPluginConsentManagerSetDebugSettings(geography, testDeviceIds): the geography index maps to APDConsentDebugGeography in the bridge and the ids travel comma-joined. Any index outside the enum, -1 for a null DTO included, clears APDConsentManager.shared.debugSettings, mirroring the -1 convention of the dismissed callbacks. SDK-1001 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The Editor simulates the form itself, so the call only logs that it is ignored off-device. SDK-1001 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
SDK-1001 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The natives read the override at request time, so the demo shows the required order: SetDebugSettings, then RequestConsentInfoUpdate. SDK-1001 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016jfw3fMgkKyrhuubSbQxXB
SDK-1001 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016jfw3fMgkKyrhuubSbQxXB
SDK-1001 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016jfw3fMgkKyrhuubSbQxXB
4.4.0 is the first mediation release whose Android core (4.4.0, Jira version 41706) and iOS pod (StackConsentManager 4.2.0) both carry ConsentManager debug settings. SDK-1001 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
Adds
ConsentManager.Instance.SetDebugSettings(ConsentDebugSettings)so a publisher can force the consent geography on a registered test device, mirroring the nativeConsentDebugSettingsAPI added in Appodeal Android SDK 4.4.0 (AppodealSDK#3335) and StackConsentManager-iOS 4.2.0 (StackConsentManager-iOS#49).Jira: SDK-1001
API
SetDebugSettings(null)clears the override. The gate (debuggable build + emulator/simulator or registered device id) and the log hints live in the native SDKs; the plugin only marshals the values.Platform mapping
AndroidCmpJavaHelper.GetConsentDebugSettingsJavaObjectbuildscom.appodeal.consent.ConsentDebugSettings(ConsentDebugGeography, java.util.ArrayList)and calls the staticConsentManager.setDebugSettings;nullclearsCMPUnityPluginConsentManagerSetDebugSettings(int geography, const char* testDeviceIds)maps the enum index toAPDConsentDebugGeographyand splits the comma-joined ids;-1clearsRelease binding
package.json: version 2.2.0,com.appodeal.mediation4.4.0. The mediation 4.4.0 release is what pulls Appodeal Android 4.4.0 and Appodeal iOS 4.4.0 (with the StackConsentManager 4.2.0 pin), so this package must not be published before it.TBDuntil the release date is known.Verification
core:4.4.0from mavenLocal, StackConsentManager 4.2.0 xcframework from PR #49).ConsentManager.setDebugSettingscall and the sample'sSetDebugSettingsin the IL2CPP metadata; iOS: device build links the local framework.🤖 Generated with Claude Code