From e86252492d611d2d4d506bd86e27cb0166f3a1b0 Mon Sep 17 00:00:00 2001 From: Ben Baron Date: Wed, 11 Oct 2023 11:26:18 -0500 Subject: [PATCH] feat: Use direct url routing config feature flag (#229) --- mParticle-Apple-SDK/MPIConstants.h | 4 ++-- mParticle-Apple-SDK/MPIConstants.m | 1 + mParticle-Apple-SDK/Utils/MPResponseConfig.m | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mParticle-Apple-SDK/MPIConstants.h b/mParticle-Apple-SDK/MPIConstants.h index deed1019..e3a88cee 100644 --- a/mParticle-Apple-SDK/MPIConstants.h +++ b/mParticle-Apple-SDK/MPIConstants.h @@ -273,6 +273,8 @@ extern NSString * _Nonnull const kMPRemoteConfigRestrictIDFA; extern NSString * _Nonnull const kMPRemoteConfigAliasMaxWindow; extern NSString * _Nonnull const kMPRemoteConfigAllowASR; extern NSString * _Nonnull const kMPRemoteConfigExcludeAnonymousUsersKey; +extern NSString * _Nonnull const kMPRemoteConfigDirectURLRouting; + extern NSString * _Nonnull const kMPRemoteConfigBlockUnplannedEvents; extern NSString * _Nonnull const kMPRemoteConfigBlockUnplannedEventAttributes; extern NSString * _Nonnull const kMPRemoteConfigBlockUnplannedIdentities; @@ -324,8 +326,6 @@ extern NSString * _Nonnull const kMPRemoteConfigDataPlanningDataPlanVersionValue extern NSString * _Nonnull const kMPRemoteConfigDataPlanningDataPlanVersionValueImpressionView; extern NSString * _Nonnull const kMPRemoteConfigDataPlanningDataPlanVersionValueImpressionClick; - - // Notifications extern NSString * _Nonnull const kMPCrashReportOccurredNotification; extern NSString * _Nonnull const kMPConfigureExceptionHandlingNotification; diff --git a/mParticle-Apple-SDK/MPIConstants.m b/mParticle-Apple-SDK/MPIConstants.m index 67fd998a..ad8d324f 100644 --- a/mParticle-Apple-SDK/MPIConstants.m +++ b/mParticle-Apple-SDK/MPIConstants.m @@ -224,6 +224,7 @@ NSString *const kMPRemoteConfigAliasMaxWindow = @"alias_max_window"; NSString *const kMPRemoteConfigAllowASR = @"iasr"; NSString *const kMPRemoteConfigExcludeAnonymousUsersKey = @"eau"; +NSString *const kMPRemoteConfigDirectURLRouting = @"dur"; NSString *const kMPRemoteConfigDataPlanningResults = @"dpr"; NSString *const kMPRemoteConfigDataPlanning = @"dtpn"; NSString *const kMPRemoteConfigDataPlanningBlock = @"blok"; diff --git a/mParticle-Apple-SDK/Utils/MPResponseConfig.m b/mParticle-Apple-SDK/Utils/MPResponseConfig.m index 932f46ba..fa50df48 100644 --- a/mParticle-Apple-SDK/Utils/MPResponseConfig.m +++ b/mParticle-Apple-SDK/Utils/MPResponseConfig.m @@ -99,6 +99,7 @@ - (nonnull instancetype)initWithConfiguration:(nonnull NSDictionary *)configurat [stateMachine configureDataBlocking:_configuration[kMPRemoteConfigDataPlanningResults]]; stateMachine.allowASR = [_configuration[kMPRemoteConfigAllowASR] boolValue]; + stateMachine.enableDirectRouting = [_configuration[kMPRemoteConfigDirectURLRouting] boolValue]; // Exception handling NSString *auxString = !MPIsNull(_configuration[kMPRemoteConfigExceptionHandlingModeKey]) ? _configuration[kMPRemoteConfigExceptionHandlingModeKey] : nil;