Skip to content

Commit e55a5da

Browse files
authored
fix: Add explicit Adobe MID resolution logging (#31)
1 parent 765804d commit e55a5da

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

mParticle-Adobe-Media/MPKitAdobeMedia.m

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,15 @@ - (void)syncId {
395395
NSLog(@"mParticle -> Adobe Media - Error getting Adobe cloud experience Id (marketing cloud Id): %@", error);
396396
} else {
397397
NSString *existingMid = [self marketingCloudIdFromIntegrationAttributes];
398-
if (mid.length > 0 && ![mid isEqualToString:existingMid]) {
399-
[[MParticle sharedInstance] setIntegrationAttributes:@{marketingCloudIdIntegrationAttributeKey: mid} forKit:[[self class] kitCode]];
398+
if (mid.length > 0) {
399+
BOOL didUpdateIntegrationAttributes = ![mid isEqualToString:existingMid];
400+
if (didUpdateIntegrationAttributes) {
401+
[[MParticle sharedInstance] setIntegrationAttributes:@{marketingCloudIdIntegrationAttributeKey: mid} forKit:[[self class] kitCode]];
402+
NSLog(@"mParticle -> Adobe Media - Updated integration attributes with Adobe cloud experience Id (marketing cloud Id)");
403+
}
404+
NSLog(@"mParticle -> Adobe Media - Successfully retrieved Adobe cloud experience Id (marketing cloud Id)%@", didUpdateIntegrationAttributes ? @"; updated integration attributes" : @"; integration attributes already up to date");
405+
} else {
406+
NSLog(@"mParticle -> Adobe Media - Adobe cloud experience Id (marketing cloud Id) was empty");
400407
}
401408
}
402409
self.syncingId = NO;

0 commit comments

Comments
 (0)