Skip to content

Commit 2b71af9

Browse files
authored
Adds setting to enable location listening (#49)
1 parent 65d64dd commit 2b71af9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Pod/Classes/SEGAmplitudeIntegration.m

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@ - (id)initWithSettings:(NSDictionary *)settings andAmplitude:(Amplitude *)amplit
2525
self.traitsToSetOnce = [NSSet setWithArray:self.settings[@"traitsToSetOnce"]];
2626
}
2727

28+
// Amplitude states that if you want location tracking disabled on startup of the app,
29+
// Call before initializing the apiKey
30+
if ([(NSNumber *)self.settings[@"enableLocationListening"] boolValue]) {
31+
[self.amplitude enableLocationListening];
32+
SEGLog(@"[Ampltidue enableLocationListening]");
33+
} else {
34+
[self.amplitude disableLocationListening];
35+
SEGLog(@"[Ampltidue disableLocationListening]");
36+
}
37+
2838
NSString *apiKey = self.settings[@"apiKey"];
2939
[self.amplitude initializeApiKey:apiKey];
3040
SEGLog(@"[Amplitude initializeApiKey:%@]", apiKey);

0 commit comments

Comments
 (0)