From b34efd368373c33d70522f2ebed7110f7eaf8a8e Mon Sep 17 00:00:00 2001 From: ngarg-mparticle <113475342+ngarg-mparticle@users.noreply.github.com> Date: Tue, 12 Dec 2023 20:38:47 -0800 Subject: [PATCH] feat: add support for custom domain proxy --- mParticle-UrbanAirship/MPKitUrbanAirship.m | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mParticle-UrbanAirship/MPKitUrbanAirship.m b/mParticle-UrbanAirship/MPKitUrbanAirship.m index 2b2b8cf..31ff187 100755 --- a/mParticle-UrbanAirship/MPKitUrbanAirship.m +++ b/mParticle-UrbanAirship/MPKitUrbanAirship.m @@ -25,6 +25,7 @@ NSString * const UAConfigAppKey = @"applicationKey"; NSString * const UAConfigAppSecret = @"applicationSecret"; +NSString * const UAConfigCustomDomainProxyUrl = @"customDomainProxyUrl"; NSString * const UAConfigEnableTags = @"enableTags"; NSString * const UAConfigIncludeUserAttributes = @"includeUserAttributes"; NSString * const UAConfigNamedUserId = @"namedUserIdField"; @@ -140,6 +141,12 @@ - (void)start { // Enable passive APNS registration config.requestAuthorizationToUseNotifications = NO; + + // Enable custom domain proxy if provided + if( self.configuration[UAConfigCustomDomainProxyUrl] ){ + config.initialConfigURL = self.configuration[UAConfigCustomDomainProxyUrl]; + config.URLAllowList = @[self.configuration[UAConfigCustomDomainProxyUrl]]; + } if ([MParticle sharedInstance].environment == MPEnvironmentDevelopment) { config.developmentAppKey = self.configuration[UAConfigAppKey];