Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.
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

Open

Description

Hello,

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.

Daniel Gatto (@dmariogatto), can you comment on this at all?

Matthew Leibowitz (@mattleibow), can you comment on this at all?

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?

Activity

  1. pboisso commented on Jan 21, 2022

    @pboisso

    +1 vote for this update as well.

  2. dmariogatto commented on Jan 24, 2022

    @dmariogatto
    Contributor

    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.

  3. blmiles commented on Jan 24, 2022

    @blmiles
    Author

    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

  4. blmiles commented on Jan 25, 2022

    @blmiles
    Author

    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()
    };

                bannerView.LoadRequest(GetRequest());
    
                Request GetRequest()
                {
                    var request = Request.GetDefaultRequest();
                    return request;
                }
    
                return bannerView;
    
        }
    

    `

    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

  5. Mataboge commented on Feb 8, 2022

    @Mataboge

    Finally somebody complained!

  6. dmariogatto commented on Feb 8, 2022

    @dmariogatto
    Contributor
  7. tipa commented on Feb 8, 2022

    @tipa

    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.

  8. dmariogatto commented on Feb 8, 2022

    @dmariogatto
    Contributor

    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)

  9. blmiles commented on Feb 17, 2022

    @blmiles
    Author

    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?

  10. tipa commented on Aug 12, 2022

    @tipa

    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?
    Screenshot 2022-08-12 at 12 26 54

    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?

  11. tipa commented on Dec 18, 2022

    @tipa

    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?

  12. pboisso commented on Nov 23, 2023

    @pboisso

    Timo Partl (@tipa) I'm interested to know if you've been able to successfully have UMP working on Xamarin.iOS?

  13. tipa commented on Nov 23, 2023

    @tipa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions