Skip to content

Commit

Permalink
feat: add support for custom domain proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
ngarg-mparticle authored Dec 13, 2023
1 parent de40e92 commit b34efd3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions mParticle-UrbanAirship/MPKitUrbanAirship.m
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit b34efd3

Please sign in to comment.