Koze / GoogleMobileAds-SPM

Unofficial Swift Package for Google Mobile Ads SDK
MIT License
20 stars 5 forks source link

πŸ’» GoogleMobileAds 8.1 crash on iOS 13 sumulator and Apple Silicon M1 #3

Closed mezhevikin closed 3 years ago

mezhevikin commented 3 years ago

Hi @Koze . I found the new problem πŸ€” This issue is not spm related, but I would like to get confirmation from other developers.

GoogleMobileAds 8.1 crash on iOS 13 sumulator if you use Apple Silicon M1 processor.

Thread 1: EXC_BREAKPOINT (code=EXC_I386_BPT, subcode=0x0)

The crash points to the AppDelegate class but the problem is in GADMobileAds.sharedInstance().start(). If you remove this method, the crash disappears.

Can you confirm or deny the problem?

I have created topic on google developer forum: https://groups.google.com/g/google-admob-ads-sdk/c/ulno5g6X9IA

Koze commented 3 years ago

@mezhevikin I found a simple workaround. Setting any of the following diagnostic options in the scheme settings will prevent the crash.

γ‚Ήγ‚―γƒͺγƒΌγƒ³γ‚·γƒ§γƒƒγƒˆ 2021-03-09 9 14 51

I verified this with Xcode 12.4 (12D4e), iOS 13.7 Simulator, macOS Big Sur 11.2.3(20D91οΌ‰ and M1 Apple Silicon Mac.

Koze commented 3 years ago

@mezhevikin According to my investigation, it has nothing to do with AdMob, xcframework, or SPM. The crash seems to be caused by a combination of Xcode 12, iOS 13 Simulator, Big Sur, and M1, even when using only system frameworks.

Please try my workaround. Thanks,

mezhevikin commented 3 years ago

Hi @Koze . I tried your workaround and it works perfectly. Thank you. I sent this information to Admob Team. I think it will be helpful in any case.

mezhevikin commented 3 years ago

Additional information: This workaround works for iOS13 simulator, but does'n work for iOS 12.4 simulator.

Koze commented 3 years ago

does'n work for iOS 12.4 simulator

I hope this will be fixed in a future version of Xcode.

jolebowski commented 3 years ago

Hi, I tried your solution but it doesn't work for me