File tree Expand file tree Collapse file tree 4 files changed +20
-0
lines changed Expand file tree Collapse file tree 4 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,11 @@ + (NSString *_Nullable)getPublishableKey {
128
128
129
129
+ (void )setUserId : (NSString *)userId {
130
130
[RadarSettings setUserId: userId];
131
+
132
+ RadarSdkConfiguration *sdkConfiguration = [RadarSettings sdkConfiguration ];
133
+ if (sdkConfiguration.syncAfterSetUser ) {
134
+ [self trackOnceWithDesiredAccuracy: RadarTrackingOptionsDesiredAccuracyMedium beacons: NO completionHandler: nil ];
135
+ }
131
136
}
132
137
133
138
+ (NSString *_Nullable)getUserId {
@@ -144,6 +149,11 @@ + (NSString *_Nullable)getDescription {
144
149
145
150
+ (void )setMetadata : (NSDictionary *)metadata {
146
151
[RadarSettings setMetadata: metadata];
152
+
153
+ RadarSdkConfiguration *sdkConfiguration = [RadarSettings sdkConfiguration ];
154
+ if (sdkConfiguration.syncAfterSetUser ) {
155
+ [self trackOnceWithDesiredAccuracy: RadarTrackingOptionsDesiredAccuracyMedium beacons: NO completionHandler: nil ];
156
+ }
147
157
}
148
158
149
159
+ (NSDictionary *_Nullable)getMetadata {
Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ NS_ASSUME_NONNULL_BEGIN
39
39
40
40
@property (nonatomic , assign ) BOOL useNotificationDiff;
41
41
42
+ @property (nonatomic , assign ) BOOL syncAfterSetUser;
43
+
42
44
/* *
43
45
Initializes a new RadarSdkConfiguration object with given value.
44
46
*/
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ - (instancetype)initWithDict:(NSDictionary *)dict {
33
33
_useOpenedAppConversion = NO ;
34
34
_useForegroundLocationUpdatedAtMsDiff = NO ;
35
35
_useNotificationDiff = NO ;
36
+ _syncAfterSetUser = NO ;
36
37
37
38
if (dict == nil ) {
38
39
return self;
@@ -93,6 +94,11 @@ - (instancetype)initWithDict:(NSDictionary *)dict {
93
94
_useNotificationDiff = [(NSNumber *)useNotificationDiffObj boolValue ];
94
95
}
95
96
97
+ NSObject *syncAfterSetUserObj = dict[@" syncAfterSetUser" ];
98
+ if (syncAfterSetUserObj && [syncAfterSetUserObj isKindOfClass: [NSNumber class ]]) {
99
+ _syncAfterSetUser = [(NSNumber *)syncAfterSetUserObj boolValue ];
100
+ }
101
+
96
102
return self;
97
103
}
98
104
@@ -110,6 +116,7 @@ - (NSDictionary *)dictionaryValue {
110
116
dict[@" useOpenedAppConversion" ] = @(_useOpenedAppConversion);
111
117
dict[@" useForegroundLocationUpdatedAtMsDiff" ] = @(_useForegroundLocationUpdatedAtMsDiff);
112
118
dict[@" useNotificationDiff" ] = @(_useNotificationDiff);
119
+ dict[@" syncAfterSetUser" ] = @(_syncAfterSetUser);
113
120
114
121
return dict;
115
122
}
Original file line number Diff line number Diff line change 12
12
"logLevel" : " info" ,
13
13
"startTrackingOnInitialize" : true ,
14
14
"trackOnceOnAppOpen" : true ,
15
+ "syncAfterSetUser" : false
15
16
}
16
17
}
17
18
}
You can’t perform that action at this time.
0 commit comments