* Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSProcessInfo isiOSAppOnMac]: unrecognized selector sent to instance 0x2834ac5d0'

It was generated from users, I have not find reproduce steps. I thinks the pic above will help.
//GULAppEnvironmentUtil.m
+ (NSString *)applePlatform {
NSString *applePlatform = @"unknown";
...
#if defined(__IPHONE_14_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 140000
if (@available(iOS 14.0, *)) {
applePlatform = [NSProcessInfo processInfo].isiOSAppOnMac ? @"ios_on_mac" : @"ios";
} else {
applePlatform = @"ios";
}
...
}
I found a few problems with this issue:
@shanksGuo Thanks for the report. Do you have device information for the crashes? And can you confirm that the crash occurs on iOS 14 and only iOS 14?
So far, according to our owner crash collection system, this crash only happened only on iOS14. We are trying to reproduce this locally.
Experiencing the same crash - 100% on iPhone (0 crashes on iPad for some reason) w/ iOS14 (we got plenty of them). Can't repro it locally though :-/
Could it be that the isiOSAppOnMac API wasn't available in the early iOS 14 betas?
@paulb777 that's my guess as well, I think I recall seeing something similar. I'm not sure if the @available check allows, but if so we could check for 14.0.1 and that could resolve it? Or we wrap in a respondsToSelector
so far, I've only dicovered limited users of this type of crash, and cannot reproduce locally.
Could it be that the
isiOSAppOnMacAPI wasn't available in the early iOS 14 betas?
I confirm your idea, I have a phone with first beta and the crash occure 100% on this device. But not on device without beta
Seeing this on an iPad running an older beta. Updating it now.
Planning to release the fix in GoogleUtilities 7.1.1 to CocoaPods in the next few days. The other Firebase distributions will pick this up in 7.2.0
Run pod update to get Google Utilities 7.1.1 that just published to CocoaPods
Thanks, I will update this.
Run
pod updateto get Google Utilities 7.1.1 that just published to CocoaPods
thank you
Most helpful comment
I confirm your idea, I have a phone with first beta and the crash occure 100% on this device. But not on device without beta