AdMob on iOS: MobileAds.SharedInstance is always null

I’m working on porting some of my old Android games, which include AdMob ads, to iOS. On Android it works great using Xamarin.GooglePlayServices.Ads. On iOS using Xamarin.Google.iOS.MobileAds, the app crashes upon startup when I call MobileAds.SharedInstance.Start(null); in FinishedLaunching because SharedInstance is always null. In fact, just having the dependency at all crashes the app when debugging on a physical device, even if no other changes are included.

I’ve tried just about everything, followed all the needed steps, etc., but it’s always null. There are only a couple of mentions of this same issue from a Google search, but no resolution to be found. Is this just an issue with the dependency, and I’m SOL for showing ads on iOS? Would an older version be appropriate to use until a fix is made, if any is needed?

We have interstitial ads working on iOS via <PackageReference Include="Xamarin.Google.iOS.MobileAds" Version="8.13.0.3" />

I’m using the same package, and have my app id in Info.plist under the GADApplicationIdentifier key. Is there something else I’m missing?

There are many parts to admob config/setup, so I really couldn’t say.

Perhaps your Info.plist is missing this?

<key>GADIsAdManagerApp</key>
<true/>

Seems that key/value isn’t needed, but I gave it a try again today and… suddenly it works? I guess AdMob needed some time to get the app ready, but I’m now able to see test ads in a simulator. It still crashes on a physical device, but that’s a problem for another day. Thanks for the help!

I have similar problem as you have mentioned, works on the Simulator but crashes on the Physical devices. Did you manage to resolve the problem?

I put it off for a while but I’m now actively working within the space again and will report back if I figure something out. One quirk I’ve found is debug builds never run on device for me, but release builds do.