@@ -66,11 +66,14 @@ - (GDTUploadPackage *)uploadPackageWithConditions:(GDTUploadConditions)condition
66
66
return ;
67
67
}
68
68
69
+ // If on wifi, upload logs that are ok to send on wifi.
69
70
if ((conditions & GDTUploadConditionWifiData) == GDTUploadConditionWifiData) {
70
71
logEventsThatWillBeSent = [self logEventsOkToSendOnWifi ];
71
72
} else {
72
73
logEventsThatWillBeSent = [self logEventsOkToSendOnMobileData ];
73
74
}
75
+
76
+ // If it's been > 24h since the last daily upload, upload logs with the daily QoS.
74
77
if (self.timeOfLastDailyUpload ) {
75
78
int64_t millisSinceLastUpload =
76
79
[GDTClock snapshot ].timeMillis - self.timeOfLastDailyUpload .timeMillis ;
@@ -113,11 +116,12 @@ typedef NS_ENUM(NSInteger, GDTCCTQoSTier) {
113
116
FOUNDATION_STATIC_INLINE
114
117
NSNumber *GDTCCTQosTierFromGDTEventQosTier (GDTEventQoS qosTier) {
115
118
switch (qosTier) {
116
- case GDTEventQoSTelemetry:
117
119
case GDTEventQoSWifiOnly:
118
120
return @(GDTCCTQoSWifiOnly);
119
121
break ;
120
122
123
+ case GDTEventQoSTelemetry:
124
+ // falls through.
121
125
case GDTEventQoSDaily:
122
126
return @(GDTCCTQoSDaily);
123
127
break ;
@@ -149,7 +153,8 @@ typedef NS_ENUM(NSInteger, GDTCCTQoSTier) {
149
153
return
150
154
[self .events objectsPassingTest: ^BOOL (GDTStoredEvent *_Nonnull event, BOOL *_Nonnull stop) {
151
155
NSNumber *qosTier = GDTCCTQosTierFromGDTEventQosTier (event.qosTier );
152
- return [qosTier isEqual: @(GDTCCTQoSDefault)] || [qosTier isEqual: @(GDTCCTQoSWifiOnly)];
156
+ return [qosTier isEqual: @(GDTCCTQoSDefault)] || [qosTier isEqual: @(GDTCCTQoSWifiOnly)] ||
157
+ [qosTier isEqual: @(GDTCCTQoSDaily)];
153
158
}];
154
159
}
155
160
0 commit comments