Skip to content

Conversation

@BrandonStalnaker
Copy link
Collaborator

Summary

  • This PR enhances the Rokt Kit integration by adding device identifiers (IDFA/IDFV) to placement attributes and fixes the attribute mapping configuration access.

Changes

Device Identifiers

  • Added idfa and idfv attributes sourced directly from filteredUser.idfa and filteredUser.idfv
  • IDFA is only populated when ATT (App Tracking Transparency) authorization has been granted
  • Moved MPID assignment into addIdentityAttributes method for better organization

Configuration Access Fix

  • Fixed attribute mapping configuration access to use the correct nested path: roktKitConfig["as"]["placementAttributesMapping"]
  • Fixed hashed email identity type configuration access to use: roktKitConfig["as"]["hashedEmailUserIdentityType"]

Code Quality Improvements

  • Introduced constants for configuration keys (kMPKitConfigurationIdKey, kMPRemoteConfigKitConfigurationKey, etc.)
  • Replaced hardcoded strings with constants throughout (kMPRoktAttributeKeySandbox, kMPRoktIdentityTypeIdfa, etc.)
  • Added comprehensive documentation to public methods
  • Improved logging messages for better debugging

Testing Plan

  • Was this tested locally? If not, explain why.

Tests will fail until new binary of core sdk is released
Added 6 new unit tests covering:

  • Device identifiers (IDFA/IDFV) being added correctly
  • Nil IDFA handling (ATT not authorized)
  • Nil IDFV handling
  • Both device identifiers nil
  • Device identifiers coexisting with user identity identifiers (idfa/idfv vs ios_idfa/ios_idfv)
  • Nil userId/MPID handling

Reference Issue (For mParticle employees only. Ignore if you are an outside contributor)

@BrandonStalnaker BrandonStalnaker self-assigned this Dec 15, 2025
@BrandonStalnaker BrandonStalnaker requested a review from a team as a code owner December 15, 2025 15:06
Copy link

@nickolas-dimitrakas nickolas-dimitrakas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

3 participants