diff --git a/mParticle-UrbanAirship/MPKitUrbanAirship.m b/mParticle-UrbanAirship/MPKitUrbanAirship.m index 2b2b8cf..8fbd87c 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 = [config.URLAllowList arrayByAddingObject:self.configuration[UAConfigCustomDomainProxyUrl]]; + } if ([MParticle sharedInstance].environment == MPEnvironmentDevelopment) { config.developmentAppKey = self.configuration[UAConfigAppKey];