Skip to content

Commit c148fb4

Browse files
authored
Fix unrecognized selector for isiOSAppOnMac on early iOS 14 betas (#6987)
1 parent 28e2a0a commit c148fb4

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

GoogleUtilities.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 = 'GoogleUtilities'
3-
s.version = '7.1.0'
3+
s.version = '7.1.1'
44
s.summary = 'Google Utilities for iOS (plus community support for macOS and tvOS)'
55

66
s.description = <<-DESC

GoogleUtilities/CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# 7.1.0 -- Unreleased
1+
# 7.1.1
2+
- Fix `unrecognized selector` for isiOSAppOnMac on early iOS 14 betas. (#6969)
3+
4+
# 7.1.0
25
- Added `NSURLSession` promise extension. (#6753)
36
- `ios_on_mac` option added to `GULAppEnvironmentUtil.applePlatform()`. (#6799)
47
- Fixed completion handler issue in `GULAppDelegateSwizzler` for

GoogleUtilities/Environment/third_party/GULAppEnvironmentUtil.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,10 +272,11 @@ + (NSString *)applePlatform {
272272
#if TARGET_OS_MACCATALYST
273273
applePlatform = @"maccatalyst";
274274
#elif TARGET_OS_IOS
275-
276275
#if defined(__IPHONE_14_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 140000
277276
if (@available(iOS 14.0, *)) {
278-
applePlatform = [NSProcessInfo processInfo].isiOSAppOnMac ? @"ios_on_mac" : @"ios";
277+
// Early iOS 14 betas do not include isiOSAppOnMac (#6969)
278+
applePlatform = ([[NSProcessInfo processInfo] respondsToSelector:@selector(isiOSAppOnMac)] &&
279+
[NSProcessInfo processInfo].isiOSAppOnMac) ? @"ios_on_mac" : @"ios";
279280
} else {
280281
applePlatform = @"ios";
281282
}

0 commit comments

Comments
 (0)