File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed
Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ After adding the dependency, you must register the integration with our SDK. To
2222#import <Segment-Amplitude/SEGAmplitudeIntegrationFactory.h>
2323```
2424
25- And add the following lines:
25+ And add the following lines if IDFA and/or Location Services are * NOT * needed :
2626
2727```
2828NSString *const SEGMENT_WRITE_KEY = @" ... ";
@@ -33,6 +33,29 @@ SEGAnalyticsConfiguration *config = [SEGAnalyticsConfiguration configurationWith
3333[SEGAnalytics setupWithConfiguration:config];
3434
3535```
36+ If IDFA or Location Services * ARE* needed:
37+
38+ ```
39+ NSString *const SEGMENT_WRITE_KEY = @" ... ";
40+ SEGAnalyticsConfiguration *config = [SEGAnalyticsConfiguration configurationWithWriteKey:SEGMENT_WRITE_KEY];
41+
42+ SEGAmplitudeIntegrationFactory *factory = [SEGAmplitudeIntegrationFactory instanceWithSetupBlock:^{
43+ amplitude.adSupportBlock = ^{
44+ return [[ASIdentifierManager sharedManager] advertisingIdentifier];
45+ };
46+ amplitude.locationInfoBlock = ^{
47+ return @{
48+ @"lat" : @37.7,
49+ @"lng" : @122.4
50+ };
51+ };
52+ }];
53+ [config use:factory];
54+
55+ [SEGAnalytics setupWithConfiguration:config];
56+
57+ ```
58+
3659
3760
3861## License
You can’t perform that action at this time.
0 commit comments