File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ - (nonnull instancetype)initWithIntegrationId:(nonnull NSNumber *)integrationId
2929 self = [super init ];
3030 if (self) {
3131 _integrationId = integrationId;
32- _attributes = attributes;
32+ _attributes = [ attributes copy ] ;
3333 }
3434
3535 return self;
Original file line number Diff line number Diff line change @@ -1273,13 +1273,15 @@ + (BOOL)registerExtension:(nonnull id<MPExtensionProtocol>)extension {
12731273
12741274#pragma mark Integration attributes
12751275- (nonnull MPKitExecStatus *)setIntegrationAttributes : (nonnull NSDictionary <NSString *, NSString *> *)attributes forKit : (nonnull NSNumber *)integrationId {
1276+ NSDictionary *attributesCopy = [attributes copy ];
12761277 __block MPKitReturnCode returnCode = MPKitReturnCodeSuccess;
12771278
12781279 MPIntegrationAttributes *integrationAttributes = [[MPIntegrationAttributes alloc ] initWithIntegrationId: integrationId attributes: attributes];
12791280
12801281 if (integrationAttributes) {
12811282 [executor executeOnMessage: ^{
1282- [self .listenerController onAPICalled: _cmd parameter1: attributes parameter2: integrationId];
1283+
1284+ [self .listenerController onAPICalled: _cmd parameter1: attributesCopy parameter2: integrationId];
12831285
12841286 [[MParticle sharedInstance ].persistenceController saveIntegrationAttributes: integrationAttributes];
12851287 }];
You can’t perform that action at this time.
0 commit comments