Skip to content

feat: pass targeting params and an authId to loadMessage - #362

Open
bschmalb-ksta wants to merge 2 commits into
thekorn:mainfrom
ksta-medien:feat/targeting-params-and-auth-id
Open

bschmalb-ksta wants to merge 2 commits into
thekorn:mainfrom
ksta-medien:feat/targeting-params-and-auth-id

Conversation

@bschmalb-ksta

@bschmalb-ksta bschmalb-ksta commented Sep 16, 2026

Copy link
Copy Markdown

The scenario in the sourcepoint portal picks which message a property serves from the targeting params the SDK sends along, and neither platform could send any, so a property with more than one message always fell through to the same one. SPConfig now takes targeting params per campaign and they reach addCampaign(campaignType, params, groupPmId) on android and SPCampaign(targetingParams:) on ios. loadMessage also takes an optional authId, which both native SDKs already accept. Both are optional and default to nothing, so an existing caller is unaffected. One thing that was simply dropped: both native sides already put the id of the tapped custom button on the pigeon message, but the dart mappers rebuilt ConsentAction without it, so customActionId was always null.

Tested with the four packages' unit tests, where the new ones cover the targeting params and the authId reaching the pigeon call and the custom action id reaching the delegate, by building the example app on an android emulator, and by running our own app on an ios simulator and an android emulator against a property whose scenario branches on a targeting param: both now serve the message the params ask for instead of the one the scenario falls through to. The example's ios build fails on main here too, on "Failed to copy Flutter framework" before any plugin code is compiled, which is why ios is covered by our own app instead.

Closes #265

The scenario in the sourcepoint portal picks the message a property
serves from the targeting params the SDK sends along, and neither
platform could send any, so a property with more than one message always
fell through to the same one.

SPConfig now takes targeting params per campaign. They reach
addCampaign(campaignType, params, groupPmId) on android and
SPCampaign(targetingParams:) on ios. loadMessage takes an optional
authId, which both native SDKs already accept, so a consent decision a
signed in user has taken elsewhere is found again instead of the message
being shown a second time.

Both are optional and default to nothing, so an existing caller is
unaffected.

Closes thekorn#265
Both native sides already put the id of the tapped custom button on the
pigeon message, but the dart mappers built a ConsentAction without it,
so ConsentAction.customActionId was always null and a message with more
than one custom button could not be told apart in onAction.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Authenticated Consent

1 participant