-
Notifications
You must be signed in to change notification settings - Fork 585
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MX-463] - Disable idfa collection in segment (#3805)
[MX-463] - Disable idfa collection in segment
- Loading branch information
Showing
5 changed files
with
53 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#import <Foundation/Foundation.h> | ||
#import "SegmentioProvider.h" | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface ARSegmentProvider : SegmentioProvider | ||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#import "ARSegmentProvider.h" | ||
#import "ARAnalyticsProviders.h" | ||
#import "SEGAnalytics.h" | ||
|
||
@interface ARSegmentProvider () | ||
@property (nonatomic, copy) NSDictionary *traits; | ||
@end | ||
|
||
@implementation ARSegmentProvider | ||
|
||
/* | ||
* Overrides initializer to disable tracking the idfa in the Segment config | ||
* the rest of the provider's functionality should be the same | ||
*/ | ||
|
||
- (instancetype)initWithIdentifier:(NSString *)identifier integrations:(NSArray *)integrations { | ||
if ((self = [super init])) { | ||
SEGAnalyticsConfiguration *config = [SEGAnalyticsConfiguration configurationWithWriteKey:identifier]; | ||
config.enableAdvertisingTracking = NO; | ||
for (id integration in integrations) { | ||
[config use:integration]; | ||
} | ||
[SEGAnalytics setupWithConfiguration:config]; | ||
_traits = @{}; | ||
} | ||
return self; | ||
} | ||
@end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters