Crash on iOS13.0 - [NSProcessInfo isMacCatalystApp]: unrecognized selector

105 views
Skip to first unread message

Bruno Cicanci

unread,
Oct 13, 2021, 6:04:21 AM10/13/21
to Google Mobile Ads SDK Developers
Hello,

I posted this issue on GitHub but I was instructed to post it here as well.

Thank you,
Bruno.



### [REQUIRED] Step 1: Describe your environment

  * Unity version: 2019.4.18f1
  * Google Mobile Ads Unity plugin version: v6.0.2
  * Platform: iOS
  * Platform OS version: iOS 13.0 (only this version)
  * Any specific devices issue occurs on: No
  * Mediation ad networks used, and their versions: N/A


### [REQUIRED] Step 2: Describe the problem

#### Steps to reproduce:

Import the Admob Unity, configure the `GoogleMobileAdsSettings` and export the iOS build. In the Xcode project build and run on any device running **iOS 13.0** (this version is important, the crash doesn't happen on iOS13.1 and later nor any previous versions). Notice the crash at launch:

```
Oct 11 09:48:25 iPhone MyApp(CoreFoundation)[374] <Notice>: -[NSProcessInfo isMacCatalystApp]: unrecognized selector sent to instance 0x280e710e0
Oct 11 09:48:25 iPhone MyApp(UnityFramework)[374] <Notice>: Uncaught exception: NSInvalidArgumentException: -[NSProcessInfo isMacCatalystApp]: unrecognized selector sent to instance 0x280e710e0
(
0   CoreFoundation                      0x00000001bb16317c D5F84910-7E94-3323-B593-A8D32E1E9518 + 1220988
1   libobjc.A.dylib                     0x00000001bb66e51c objc_exception_throw + 56
2   CoreFoundation                      0x00000001bb0683e8 D5F84910-7E94-3323-B593-A8D32E1E9518 + 193512
3   CoreFoundation                      0x00000001bb16736c D5F84910-7E94-3323-B593-A8D32E1E9518 + 1237868
4   CoreFoundation                      0x00000001bb168dac _CF_forwarding_prep_0 + 92
5   UnityFramework                      0x00000001046f9818 GADTransparencyAuthorizationStatus + 452
6   UnityFramework                      0x00000001046f9710 GADTransparencyAuthorizationStatus + 188
7   libdispatch.dylib                   0x00000001bb989244 8AFE5198-83E4-3934-9CF7-AB9304A24917 + 373316
8   libdispatch.dylib                   0x00000001bb930bc4 8AFE5198-83E4-3934-9CF7-AB9
Oct 11 09:48:25 iPhone MyApp(CoreFoundation)[374] <Notice>: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSProcessInfo isMacCatalystApp]: unrecognized selector sent to instance 0x280e710e0'

```

#### Relevant Code:

[Apple documentation](https://developer.apple.com/documentation/foundation/nsprocessinfo/3362531-maccatalystapp) says that the `[NSProcessInfo isMacCatalystApp]` is supported on iOS13.0+ but if you just build an empty application with the code below and run on any device with iOS 13.0 you will see the same crash as the one on Admob.

```
NSProcessInfo *processInfo = [[NSProcessInfo alloc] init];
if (@available(iOS 13.0, *)) {
    NSLog(@"isMacCatalystApp: %i", [processInfo isMacCatalystApp]);
else {
    NSLog(@"isMacCatalystApp NOT available");
}
```

I don't have access to the Admob iOS framework code but I believe that changing the validation to iOS 13.1+ where the `[NSProcessInfo isMacCatalystApp]` is used would fix this issue for now. I understant this could be a bug on the iOS itself but it's an easy fix on Admob iOS framework that will make ir more stable and reliable.

Thank you.

Mobile Ads SDK Forum Advisor

unread,
Oct 13, 2021, 1:34:40 PM10/13/21
to brunoc...@gmail.com, google-adm...@googlegroups.com
Hi Bruno,

Thank you for bringing this to our attention. I was able to look at the github posting that you mentioned. I see that a teammate of ours was able to respond to you there. To just follow up with what he mentioned. Can you share with us a simple app that is able to show the behavior of this. As well as any steps to replicate this. At the same time in looking over this, it would appear to be mor4e of any issue with Apple and iOS, also when building a test app we recommend to not use an empty app as we have seen that this can also cause some issues sometimes.

Regards,
Google Logo
William Pescherine
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2PJC7e:ref

Bruno Cicanci

unread,
Oct 14, 2021, 4:24:55 AM10/14/21
to Mobile Ads SDK Forum Advisor, google-adm...@googlegroups.com
Hi William,

I was able to reproduce the issue using any sample app from here:

However, the crash I reported only happens on iOS 13.0. I tested the same app on iOS 13.1 and later but it didn't happen. That's why I believe that it's something to do with this specific version of iOS. As you can see the error "[NSProcessInfo isMacCatalystApp]: unrecognized selector sent to instance" was caused somewhere in the GADTransparencyAuthorizationStatus class, which I think is internal to the Admob iOS framework.

Thanks,
Bruno.

Mobile Ads SDK Forum Advisor

unread,
Oct 14, 2021, 10:23:48 AM10/14/21
to brunoc...@gmail.com, google-adm...@googlegroups.com
Hi Bruno,

Thank you for all the information. I saw that you have had a conversation with one of my teammates. Allow me to bring this additional information to him and see what feedback he is able to give you with what we have discussed here. Once we hear something more either he or I will get in touch with you.

Mobile Ads SDK Forum Advisor

unread,
Oct 14, 2021, 2:50:39 PM10/14/21
to google-adm...@googlegroups.com, brunoc...@gmail.com

Hi Bruno,

I am Nick, I will be helping you with your runtime error. Unfortunately, I was unable to replicate the issue. Here are my steps I took :

  1. Start with the Hello World sample.
  2. Install GMA SDK 6.0.2
  3. Select XCode 13 in build settings.
  4. Build and run the sample.
  5. Opened a few ads.

Being that I was unable to replicate this error on our end, the next step would for you to provide a minimal sample of this issue free of third party dependencies.  Please send this sample privately by sending these details to our testing email address at (mobileads...@gmail.com).

Please reach out if you need any more support,

Nick



ref:_00D1U1174p._5004Q2PJC7e:ref

Bruno Cicanci

unread,
Oct 18, 2021, 4:53:41 PM10/18/21
to Mobile Ads SDK Forum Advisor, google-adm...@googlegroups.com
Hello Nick, thank you for your reply.

Did you test those steps on a device running iOS 13.0 (this specific version)? 

I'm still able to reproduce on that iOS version using the same Hello World sample app. In my case it crashes at launch with the error message that I posted in my original email. I also tested using Xcode 12.5 and Xcode 13.0, and different settings on the Xcode project, but the crash still happens on the iOS 13.0.

Bruno.

Mobile Ads SDK Forum Advisor

unread,
Nov 1, 2021, 12:35:38 PM11/1/21
to brunoc...@gmail.com, google-adm...@googlegroups.com

Hi Bruno,

I test the hello world sample project on a simulator targeting iOS 13 and XCode 13, and saw no issues.
 

Bruno Cicanci

unread,
Nov 1, 2021, 12:40:02 PM11/1/21
to Mobile Ads SDK Forum Advisor, google-adm...@googlegroups.com
Hello,

It's not possible to reproduce in the simulator. The crash will only happen on a real device running iOS 13.0 (this specific version, not 13.1 or above). It has to be a reaL device and running iOS 13.0.

Best,
Bruno.

Mobile Ads SDK Forum Advisor

unread,
Nov 15, 2021, 6:59:57 PM11/15/21
to brunoc...@gmail.com, google-adm...@googlegroups.com

Hi Bruno,

We were unable to replicate the issue once again. Is it possible that you are running the beta version of iOS 13? If this is a beta, we recommend the device be updated. GMA SDK does not support devices running betas.

Thanks,
Nick



ref:_00D1U1174p._5004Q2PJC7e:ref

Bruno Cicanci

unread,
Nov 17, 2021, 11:30:46 AM11/17/21
to Mobile Ads SDK Forum Advisor, google-adm...@googlegroups.com
Hello Nick,

Thank you very much for double checking the issue. I just confirmed with the QA team that this device is indeed running the iOS 13.0 beta (17a5492t), sorry for not checking that beforehand. 

We'll close the issue on our side since GMA SDK is not supported on devices running beta and thank you for this information.

Best,
Bruno.
Reply all
Reply to author
Forward
0 new messages