You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 1, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on May 1, 2024. It is now read-only.
Mobile Ads SDK (iOS) versioning error - Xamarin.Firebase.iOS.Admob plugin #520
Methinks someone should update this plugin library as it fails in the app (iOS Xamarin) citing wrong version of the Mobile Ads SDK.
This is what I get -
2022-01-21 13:56:38.844 MyCompany[3831:1156576] Google:HTML You are currently using version 7.66.0 of the SDK. Please consider updating your SDK to the most recent SDK version (8.13.0) to get the latest features and bug fixes. The latest SDK can be downloaded from https://goo.gl/UoiJ8F. A full list of release notes is available at https://developers.google.com/admob/ios/rel-notes.
This really stops progress on implementing AdMob into our Xamarin.Forms app. I'm sure we're no the only ones either.
Wondering if the Admob plugin can just be rebuilt with the latest Google SDK or if there are code fixes/mods necessary if targeting the latest SDK....
Any feedback?
Reacted by Obakeng, BenEastpoint and Federico Navarrete
Lindsay Miles (@blmiles) I've just helped out with keeping the bindings up-to-date. I'm not a project maintainer and I don't have any extra knowledge on the release timeline beyond what is public on the repo.
I personally use AdMob and have been using a custom nuget built from my PR (#501) while I wait for an offical release.
Daniel Gatto (@dmariogatto) , thanks for the response Daniel. I've pulled code but there seems to be too many external references to build...
If possible, could you tag whomever IS responsible for getting an update out.
There are a lot of people awaiting an update, you and I included, and it's time MS and the Xamarin team get it done.
Apart from needing the Xamarin.Firebase.iOS.Admob plugin updated with the latest Google SDK, here's minor work-around in the AdmobViewRenderer as cited in the samples...
When navigating TO various pages, we're not seeing any issues or breaks, however, navigating BACK to a previous page or the main page in a Xamarin.Forms app was causing a crash and the App quits.
This is because the "Element" in the CreateBannerView() method is null and the AdUnitId cannot be set.
I simply set the AdUnitId directly in the CreateBannerView method and this works fine for now.
Obviously I can move the id string into the plist or wherever else you store string vars/consts.
The new package is missing the stuff from Google.MobileAds.Consent.
Was the ConsentForm removed from the library or is it just due to missing bindings?
Seems like I am stuck on v7.66 for now.
I am in the process of porting my Xamarin.iOS app to .NET for iOS and I am having problems with this again.
I can use the stuff from the Google.MobileAds namespace, but the Google.UserMessagingPlatform namespace is not available, event though I referenced the UserMessagingPlatform Nuget. Perhaps that package hasn't been built for the net6.0-ios target yet like the MobileAds package has?
Edit: Just realised that the most recent version for UserMessagingPlatform on Nuget is 1.1.0.1, is that the one we are supposed to use?
Even then, the build fails with: /Users/tp/GitHub/atomicclock/AtomicClock.iOS/obj/MyApp.csproj.nuget.g.targets(5,5): Error MSB4024: The imported project file "/Users/tp/.nuget/packages/xamarin.google.ios.usermessagingplatform/1.1.0.1/buildTransitive/Xamarin.Google.iOS.UserMessagingPlatform.targets" could not be loaded. The '_GoogleUserMessagingPlatformAssemblyName' start tag on line 3 position 6 does not match the end tag of '_GoogleMobileAdsAssemblyName'. Line 3, position 132. (MSB4024) (MyApp)
I assume that is a bug here. Does anyone has experience on how to build this project locally after fixing this?
Jonathan Dick (@Redth) are the UMP bindings still supported and if so, can we expect working bindings and a new Nuget version at some point or should we expect this binding to be deprecated and not supported by Microsoft?
Activity
pboisso commentedon Jan 21, 2022
+1 vote for this update as well.
dmariogatto commentedon Jan 24, 2022
Lindsay Miles (@blmiles) I've just helped out with keeping the bindings up-to-date. I'm not a project maintainer and I don't have any extra knowledge on the release timeline beyond what is public on the repo.
I personally use AdMob and have been using a custom nuget built from my PR (#501) while I wait for an offical release.
blmiles commentedon Jan 24, 2022
Daniel Gatto (@dmariogatto) , thanks for the response Daniel. I've pulled code but there seems to be too many external references to build...
If possible, could you tag whomever IS responsible for getting an update out.
There are a lot of people awaiting an update, you and I included, and it's time MS and the Xamarin team get it done.
Thanks
blmiles commentedon Jan 25, 2022
Apart from needing the Xamarin.Firebase.iOS.Admob plugin updated with the latest Google SDK, here's minor work-around in the AdmobViewRenderer as cited in the samples...
When navigating TO various pages, we're not seeing any issues or breaks, however, navigating BACK to a previous page or the main page in a Xamarin.Forms app was causing a crash and the App quits.
This is because the "Element" in the CreateBannerView() method is null and the AdUnitId cannot be set.
I simply set the AdUnitId directly in the CreateBannerView method and this works fine for now.
Obviously I can move the id string into the plist or wherever else you store string vars/consts.
`
private BannerView CreateBannerView()
{
bannerView = new BannerView(AdSizeCons.SmartBannerPortrait)
{
AdUnitId = "ca-app-pub-[your adunitId here]",
RootViewController = GetVisibleViewController()
};
`
Not tried the Android implementation yet but this makes all GoogleAds work in iOS Xamarin.Forms app.
Simple, but I hope that helps someone...
Thanks
Mataboge commentedon Feb 8, 2022
Finally somebody complained!
dmariogatto commentedon Feb 8, 2022
Lindsay Miles (@blmiles)
AbMob 8.13 is now on NuGet.
tipa commentedon Feb 8, 2022
The new package is missing the stuff from
Google.MobileAds.Consent.Was the
ConsentFormremoved from the library or is it just due to missing bindings?Seems like I am stuck on v7.66 for now.
dmariogatto commentedon Feb 8, 2022
Timo Partl (@tipa) UMP was removed from the AdMob package and moved to a separate binding.
It should've been released, however, looks like the package name is already in use (you might be able to use that package for the time being).
Jonathan Dick (@Redth) Israel Soto (@SotoiGhost)
blmiles commentedon Feb 17, 2022
Hi, thanks Daniel Gatto (@dmariogatto)
Unfortunately, probably need to roll back...
I updated to the new release, cleaned solution, rebuild and I get this error:
Severity Code Description Project File Line Suppression State
Error Can't resolve the reference 'System.IntPtr ObjCRuntime.DisposableObject::get_Handle()', referenced from the method 'System.Void Google.MobileAds.AdLoaderDelegateWrapper::DidFailToReceiveAd(Google.MobileAds.AdLoader,Foundation.NSError)' in 'Xamarin.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'. mycompany.iOS C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets 254
Any ideas? Anyone?
tipa commentedon Aug 12, 2022
I am in the process of porting my Xamarin.iOS app to .NET for iOS and I am having problems with this again.
I can use the stuff from the
Google.MobileAdsnamespace, but theGoogle.UserMessagingPlatformnamespace is not available, event though I referenced theUserMessagingPlatformNuget. Perhaps that package hasn't been built for thenet6.0-iostarget yet like theMobileAdspackage has?Edit: Just realised that the most recent version for

UserMessagingPlatformon Nuget is 1.1.0.1, is that the one we are supposed to use?Even then, the build fails with:
/Users/tp/GitHub/atomicclock/AtomicClock.iOS/obj/MyApp.csproj.nuget.g.targets(5,5): Error MSB4024: The imported project file "/Users/tp/.nuget/packages/xamarin.google.ios.usermessagingplatform/1.1.0.1/buildTransitive/Xamarin.Google.iOS.UserMessagingPlatform.targets" could not be loaded. The '_GoogleUserMessagingPlatformAssemblyName' start tag on line 3 position 6 does not match the end tag of '_GoogleMobileAdsAssemblyName'. Line 3, position 132. (MSB4024) (MyApp)I assume that is a bug here. Does anyone has experience on how to build this project locally after fixing this?
tipa commentedon Dec 18, 2022
Jonathan Dick (@Redth) are the UMP bindings still supported and if so, can we expect working bindings and a new Nuget version at some point or should we expect this binding to be deprecated and not supported by Microsoft?
pboisso commentedon Nov 23, 2023
Timo Partl (@tipa) I'm interested to know if you've been able to successfully have UMP working on Xamarin.iOS?
tipa commentedon Nov 23, 2023
Patrice Boissonneault (@pboisso) Yes I have, see here