From 28f6a0ca8cd11427cc8e655fd2ac72768654fca8 Mon Sep 17 00:00:00 2001 From: v-lecheverria Date: Fri, 18 Oct 2024 10:50:06 -0300 Subject: [PATCH] fix: update consent attributes after kit is initialized --- Sources/mParticle-Appboy/MPKitAppboy.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/mParticle-Appboy/MPKitAppboy.m b/Sources/mParticle-Appboy/MPKitAppboy.m index bc9dbd3..8c0c0ac 100644 --- a/Sources/mParticle-Appboy/MPKitAppboy.m +++ b/Sources/mParticle-Appboy/MPKitAppboy.m @@ -334,9 +334,6 @@ - (MPKitExecStatus *)didFinishLaunchingWithConfiguration:(NSDictionary *)configu _started = NO; } - // Update Consent on launch - [self updateConsent]; - execStatus = [[MPKitExecStatus alloc] initWithSDKCode:[[self class] kitCode] returnCode:MPKitReturnCodeSuccess]; return execStatus; } @@ -398,6 +395,9 @@ - (void)start { self->_started = YES; + // Update Consent on start + [self updateConsent]; + dispatch_async(dispatch_get_main_queue(), ^{ NSDictionary *userInfo = @{mParticleKitInstanceKey:[[self class] kitCode]};