Repository navigation
Feature - Add consent independent device attributes api - #155
Merged
akhiljain1907 merged 15 commits intoOct 21, 2026
Merged
Conversation
5 of 10 tasks
sagar-sharma-adobe
approved these changes
Oct 21, 2026
Introduce updateDeviceAttributesBypassConsent(_:), a new public API that lets apps sync device attributes (timezone, push token) to Edge without being gated by collect consent. It dispatches an operational-data event that a Launch rule forwards to Edge's device-attributes endpoint, keeping this data off the normal consent-gated interact path. Key pieces: - DeviceAttributes struct as the input, so new attributes can be added later without changing the API signature (Swift-only; a struct param can't be bridged to @objc). - Generalize ProfileAttributeHandler into AttributeHandler with an injected store name and a dedup flag, and rename the file accordingly. - Give the profile and device paths separate dedup stores so identical values on one path never suppress the other. Sharing a store would let a profile update silently swallow the device dispatch (data loss), so the two store names must stay distinct. - Make device-path dedup configurable via edgeidentity.deviceAttributes.dedup (defaults to true). - Derive the APNs platform from messaging.useSandbox, since the aps environment isn't reliably readable at runtime. The device path deliberately publishes no XDM shared state: nothing reads it, and putting device attributes there risks leaking them onto the consent-gated path. Adds unit and functional coverage for routing, dedup on/off, store isolation, the profile-vs-device clash, and app-context handling.
…en map instead of fixed DeviceAttributes structure
…from rules engine and also update success in store based on successful edge response.
- Use the nested synced store with deep-merge commits and order-insensitive array comparison - Dedup against the synced store first, and against owner values only when collect consent is y; treat an unregistered Consent extension as y - Copy values that match an owner into the synced store - Release the active request on any matching Edge result, matched by parentID or requestEventId - Publish the Device Attributes Sync Result event from Edge Identity on success and on failure - Publish profileAttributes in the standard shared state and keep XDM as released - Rename the dedup config key to edgeidentity.optimizeOperationalProfileDataSync - Clear Live Activity tokens when Messaging clears Live Activities - Run DeviceAttributeDeduplicatorTests in the UnitTests target
akhiljain1907
force-pushed
the
feature/device-attributes-review-fixes
branch
from
October 21, 2026 11:36
9400880 to
65094c6
Compare
10 tasks
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.
Description
Adds
Identity.updateOperationalData(_:). It sends operational data, such as the timezone, push token and Live Activity push-to-start tokens, to the Edge Network whatever the collect consent. Only values allowed by a Tags rule are sent, and only when they changed. Behavior matches Edge Identity Android (adobe/aepsdk-edgeidentity-android#155).Public API
Identity.updateOperationalData(_ attributes: [String: Any])[AEPMobileEdgeIdentity updateOperationalData:](NSDictionary<NSString *, id> *)Flow
edgeIdentity/com.adobe.eventSource.requestOperationalData. Edge Identity matches the event on type and source, not name.com.adobe.eventType.generic.operationalData/requestContent.forward-operational-dataconsequence (AEPCore 5.13.0) returns only the allowed paths asedgeIdentity/com.adobe.eventSource.responseOperationalData. If no rule matches, nothing is sent and no result event is dispatched.app { id: <bundle id>, platform: apns | apnsSandbox }(frommessaging.useSandbox), and dispatchescom.adobe.eventType.edgeDeviceAttributes/requestContent. The Edge extension sends this to the device attributes endpoint.edgeDeviceAttributes/responseContent) for the active request arrives, whatever its status.Deduplication (
edgeidentity.optimizeOperationalProfileDataSync, defaulttrue)timezone,tokens.pushNotificationandtokens.liveActivityStartare deduplicated and stored. Push-to-start tokens are compared ignoring order. All other values, includingtokens.liveActivityUpdate, are always sent and never stored.y, or the Consent extension is not registered, a value is also skipped when it matches what its owner already holds: the timezone set throughMobileCore.updateProfileAttributes, or Messaging's push token and push-to-start tokens. That value is stored as confirmed.com.adobe.mobilecore.operationalDatacollection. They are cleared byresetIdentities. Push-to-start tokens are also cleared when Messaging clears Live Activities.Events and shared state
Operational Data Sync Resultevent (edgeIdentity/responseContent) containing{status, reason, attributes}.reasonis""on success.reasonisunchanged,identityResetormissingAppIdentifier.unknown.Operational data confirmedevent (messaging/responseContent,{tokens}) is dispatched for Messaging.profileAttributes. At registration this is published only when something is stored.Changes to existing behavior
updateProfileAttributes, released in 5.1.0): an XDM shared state is created only when the timezone actually changes. Previously, every profile attributes event resolved a pending XDM shared state. The XDMcom.adobe.mobilecore.profileAttributes.timeZonecontent is unchanged.>= 5.13.0inAEPEdgeIdentity.podspecandPackage.swift.Podfile.lockupdated to Core 5.13.0 and AEPIdentity 5.13.0 (test dependency).dev-v5.2.0).Dependencies for release
com.adobe.eventType.edgeDeviceAttributes(Isolated consent-independent device-attributes endpoint path to Edge Network aepsdk-edge-ios#547). Edge Identity cannot declare Edge as a dependency, because Edge already depends on Edge Identity. With an older Edge, the request gets no response, and later requests wait behind it.Operational data confirmedevent by type, source andtokens, not by event name.Related Issue
MOB-25063. Supersedes #149 and #154. Android: adobe/aepsdk-edgeidentity-android#155. Edge: adobe/aepsdk-edge-ios#547.
Motivation and Context
The timezone, push token and Live Activity push-to-start tokens are operational data that must reach the profile even without collect consent. The existing profile and Messaging paths are consent-gated. This API sends these values through Edge's dedicated device attributes endpoint, but only the values a Tags rule allows. It does not resend values that have not changed, and it reports every outcome so callers and Messaging can react.
How Has This Been Tested?
New tests:
IdentityOperationalDataTests(93): routing,app, deduplication and the config flag, owner comparison at every consent state, the queue and response matching, result and confirmed events, reset, shared state and Live Activity clear.OperationalDataDeduplicatorTests(16).IdentityPublicAPITests.IdentityTimezoneTestsandIdentityTestsare updated for the profile attributes shared-state change.Local runs on Xcode 26.3, iPhone 16 simulator (iOS 18.4):
xcodebuild test -workspace AEPEdgeIdentity.xcworkspace -scheme UnitTests: passed, 149/149, at9400880. The code is identical to65094c6apart from the 5.2.0 version bump.xcodebuild test -workspace AEPEdgeIdentity.xcworkspace -scheme FunctionalTests: passed, 144/144, at9400880.make lint: passed, no violations, at9400880.xcodebuild test ... -only-testing:FunctionalTests/EdgeIdentityAndIdentityDirectTests: passed, 8/8, at65094c6.65094c6:.min UnitTests: passed, 4/4. The generated header declares+ (void)updateOperationalData:(NSDictionary<NSString *, id> * _Nonnull)attributes;.LaunchRulesEnginewith aforward-operational-datarule: passed, 23/23. They cover all, push-only, timezone-only and no attributes enabled, no matching rule, consent y/n/pending, the timezone set through both paths, push token owner match, sandbox platform, failure retry, reset and restart.Also verified with a temporary harness: Edge Identity together with Messaging (
feat/live-activity-consent-independent-forward) and the Consent extension, using real EventHub and Core 5.13.0, with Edge's device attributes response simulated. Consent transitions caused no extra device attributes requests for synced values.CI: the first run on
65094c6failed once inEdgeIdentityAndIdentityDirectTests.testEcidsAreDifferentAfterReset, which is unrelated and passes locally. A re-run is in progress.Screenshots (if appropriate):
N/A
Types of changes
Checklist: