File tree Expand file tree Collapse file tree 2 files changed +10
-17
lines changed Expand file tree Collapse file tree 2 files changed +10
-17
lines changed Original file line number Diff line number Diff line change @@ -2937,16 +2937,13 @@ - (BOOL)shouldWaitForAttStatus {
2937
2937
2938
2938
// check current ATT status
2939
2939
int attStatus = [self attStatus ];
2940
- // App Tracking Transparency framework usage is disabled
2941
- if (attStatus == -1 ) {
2942
- // Just in case it's there from the previous init where
2943
- // App Tracking Transparency framework usage was enabled,
2944
- // remove ATT Waiting related stuff.
2945
- [ADJUserDefaults removeAttWaitingRemainingSeconds ];
2946
- return NO ;
2947
- }
2948
-
2949
- // return if the status is not ATTrackingManagerAuthorizationStatusNotDetermined
2940
+ // if attStatus is !=0 means:
2941
+ // - consent changed from ATTrackingManagerAuthorizationStatusNotDetermined ( attStatus > 0 )
2942
+ // or
2943
+ // - App Tracking Transparency framework usage is disabled ( attStatus == -1 )
2944
+ // In these cases:
2945
+ // 1. NO returned
2946
+ // 2. ATT Waiting related stuff is removed from UserDefaults as irrelevant.
2950
2947
if (attStatus != 0 ) {
2951
2948
// Delete att_waiting_seconds key from UserDefaults.
2952
2949
[ADJUserDefaults removeAttWaitingRemainingSeconds ];
Original file line number Diff line number Diff line change @@ -189,11 +189,9 @@ - (nonnull NSString *)urlWithParams:(nonnull NSMutableDictionary *)params
189
189
190
190
// checking consent related parameters at the package creation moment
191
191
NSString *attStatusString = [responseData.sdkPackage.parameters objectForKey: @" att_status" ];
192
- BOOL wasConsentWhenCreated = NO ;
193
- if (attStatusString != nil ) {
194
- wasConsentWhenCreated = [ADJUtil shouldUseConsentParamsForActivityKind: responseData.activityKind
195
- andAttStatus: attStatusString.intValue];
196
- }
192
+ int paramsAttStatus = (attStatusString != nil ) ? attStatusString.intValue : -1 ;
193
+ BOOL wasConsentWhenCreated = [ADJUtil shouldUseConsentParamsForActivityKind: responseData.activityKind
194
+ andAttStatus: paramsAttStatus];
197
195
198
196
// checking consent related parameters at the package sending moment
199
197
int attStatus = -1 ;
@@ -460,8 +458,6 @@ - (void)handleResponseWithData:(NSData *)data
460
458
[self injectParameters: mergedParameters kvArray: kvParameters];
461
459
462
460
NSString *bodyString = [kvParameters componentsJoinedByString: @" &" ];
463
- [self .logger verbose: @" Body (String) to send: [%@ ]" , bodyString];
464
-
465
461
NSData *body = [NSData dataWithBytes: bodyString.UTF8String length: bodyString.length];
466
462
[request setHTTPBody: body];
467
463
return request;
You can’t perform that action at this time.
0 commit comments