Skip to content

Commit ca44b64

Browse files
GDT: remove pre Xcode 10 availability checks (#6486)
* GDT: remove pre Xcode 11 availability checks * Revert Xcode 10 required availability checks * Changelog
1 parent b7fc899 commit ca44b64

File tree

2 files changed

+5
-17
lines changed

2 files changed

+5
-17
lines changed

GoogleDataTransport/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Unreleased
2+
- Legacy pre Xcode 10 compatibility checks removed. (#6486)
3+
14
# v7.4.0
25
- Limit disk space consumed by GoogleDataTransport to store events. (#6365)
36
- Fix `GDTTransformer` background task handling. (#6258)

GoogleDataTransport/GDTCORLibrary/GDTCORPlatform.m

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,7 @@ GDTCORNetworkMobileSubtype GDTCORNetworkMobileSubTypeMessage() {
127127
if (networkCurrentRadioAccessTechnologyDict.count) {
128128
networkCurrentRadioAccessTechnology = networkCurrentRadioAccessTechnologyDict.allValues[0];
129129
}
130-
#else // TARGET_OS_MACCATALYST
131-
#if defined(__IPHONE_12_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 120000
130+
#else // TARGET_OS_MACCATALYST
132131
if (@available(iOS 12.0, *)) {
133132
NSDictionary<NSString *, NSString *> *networkCurrentRadioAccessTechnologyDict =
134133
networkInfo.serviceCurrentRadioAccessTechnology;
@@ -138,9 +137,7 @@ GDTCORNetworkMobileSubtype GDTCORNetworkMobileSubTypeMessage() {
138137
networkCurrentRadioAccessTechnology = networkCurrentRadioAccessTechnologyDict.allValues[0];
139138
}
140139
} else {
141-
#else // defined(__IPHONE_12_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 120000
142-
networkCurrentRadioAccessTechnology = networkInfo.currentRadioAccessTechnology;
143-
#endif // // defined(__IPHONE_12_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 120000
140+
networkCurrentRadioAccessTechnology = networkInfo.currentRadioAccessTechnology;
144141
}
145142
#endif // TARGET_OS_MACCATALYST
146143
if (networkCurrentRadioAccessTechnology) {
@@ -194,11 +191,6 @@ GDTCORNetworkMobileSubtype GDTCORNetworkMobileSubTypeMessage() {
194191
}
195192
}
196193
NSData *resultData;
197-
#if (defined(__IPHONE_11_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || \
198-
(defined(__MAC_10_13) && MAC_OS_X_VERSION_MAX_ALLOWED >= 101300) || \
199-
(defined(__TVOS_11_0) && __TV_OS_VERSION_MAX_ALLOWED >= 110000) || \
200-
(defined(__WATCHOS_4_0) && __WATCH_OS_VERSION_MAX_ALLOWED >= 040000) || \
201-
(defined(TARGET_OS_MACCATALYST) && TARGET_OS_MACCATALYST)
202194
if (@available(macOS 10.13, iOS 11.0, tvOS 11.0, watchOS 4, *)) {
203195
resultData = [NSKeyedArchiver archivedDataWithRootObject:obj
204196
requiringSecureCoding:YES
@@ -216,7 +208,6 @@ GDTCORNetworkMobileSubtype GDTCORNetworkMobileSubTypeMessage() {
216208
}
217209
}
218210
} else {
219-
#endif
220211
@try {
221212
#pragma clang diagnostic push
222213
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
@@ -248,11 +239,6 @@ GDTCORNetworkMobileSubtype GDTCORNetworkMobileSubTypeMessage() {
248239
NSData *_Nullable archiveData,
249240
NSError *_Nullable *error) {
250241
id<NSSecureCoding> unarchivedObject = nil;
251-
#if (defined(__IPHONE_11_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || \
252-
(defined(__MAC_10_13) && MAC_OS_X_VERSION_MAX_ALLOWED >= 101300) || \
253-
(defined(__TVOS_11_0) && __TV_OS_VERSION_MAX_ALLOWED >= 110000) || \
254-
(defined(__WATCHOS_4_0) && __WATCH_OS_VERSION_MAX_ALLOWED >= 040000) || \
255-
(defined(TARGET_OS_MACCATALYST) && TARGET_OS_MACCATALYST)
256242
if (@available(macOS 10.13, iOS 11.0, tvOS 11.0, watchOS 4, *)) {
257243
NSData *data = archiveData ? archiveData : [NSData dataWithContentsOfFile:archivePath];
258244
if (data) {
@@ -261,7 +247,6 @@ GDTCORNetworkMobileSubtype GDTCORNetworkMobileSubTypeMessage() {
261247
error:error];
262248
}
263249
} else {
264-
#endif
265250
@try {
266251
NSData *archivedData =
267252
archiveData ? archiveData : [NSData dataWithContentsOfFile:archivePath];

0 commit comments

Comments
 (0)