Skip to content

Commit c51a525

Browse files
GoogleDataTransport: deprecated API conditions (#6697)
* GoogleDataTransport: deprecated API conditions * Version bump * use `TARGET_OS_IOS` * changelog * changelog * style
1 parent a5c4bfe commit c51a525

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

GoogleDataTransport.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'GoogleDataTransport'
3-
s.version = '7.5.0'
3+
s.version = '7.5.1'
44
s.summary = 'Google iOS SDK data transport.'
55

66
s.description = <<-DESC

GoogleDataTransport/CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Unreleased
1+
# v7.5.1
2+
- Fix deprecation warning for iOS 12.0 and higher projects. (#6682)
3+
4+
# v7.5.0
25
- Legacy pre Xcode 10 compatibility checks removed. (#6486)
36
- `GDTCORDirectorySizeTracker` crash fixed. (#6540)
47

GoogleDataTransport/GDTCORLibrary/GDTCORPlatform.m

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ GDTCORNetworkMobileSubtype GDTCORNetworkMobileSubTypeMessage() {
127127
if (networkCurrentRadioAccessTechnologyDict.count) {
128128
networkCurrentRadioAccessTechnology = networkCurrentRadioAccessTechnologyDict.allValues[0];
129129
}
130-
#else // TARGET_OS_MACCATALYST
130+
#else // TARGET_OS_MACCATALYST
131131
if (@available(iOS 12.0, *)) {
132132
NSDictionary<NSString *, NSString *> *networkCurrentRadioAccessTechnologyDict =
133133
networkInfo.serviceCurrentRadioAccessTechnology;
@@ -137,7 +137,9 @@ GDTCORNetworkMobileSubtype GDTCORNetworkMobileSubTypeMessage() {
137137
networkCurrentRadioAccessTechnology = networkCurrentRadioAccessTechnologyDict.allValues[0];
138138
}
139139
} else {
140+
#if TARGET_OS_IOS && __IPHONE_OS_VERSION_MIN_REQUIRED < 120000
140141
networkCurrentRadioAccessTechnology = networkInfo.currentRadioAccessTechnology;
142+
#endif // TARGET_OS_IOS && __IPHONE_OS_VERSION_MIN_REQUIRED < 120000
141143
}
142144
#endif // TARGET_OS_MACCATALYST
143145
if (networkCurrentRadioAccessTechnology) {
@@ -147,9 +149,9 @@ GDTCORNetworkMobileSubtype GDTCORNetworkMobileSubTypeMessage() {
147149
} else {
148150
return GDTCORNetworkMobileSubtypeUNKNOWN;
149151
}
150-
#else
152+
#else // TARGET_OS_IOS
151153
return GDTCORNetworkMobileSubtypeUNKNOWN;
152-
#endif
154+
#endif // TARGET_OS_IOS
153155
}
154156

155157
NSString *_Nonnull GDTCORDeviceModel() {

0 commit comments

Comments
 (0)