Closed erossini closed 9 months ago
Hi, This is actually an issue UMP package.
After downloading it (you now already have it on your PC), go in your nuget cache directory, find the UMP package, find the file Xamarin.Google.iOS.UserMessagingPlatform.targets and find the line with <_GoogleUserMessagingPlatformAssemblyName>Google.UserMessagingPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
and replace it with:
<_GoogleUserMessagingPlatformAssemblyName>Google.UserMessagingPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=nullDo it and it will work again. I'll see if I can do something to fix this or duplicate the package (not sure if I can legally do it...)
Any questions let me know.
I've just updated the plugin to version 1.1.1.
This will add a new dependency replacing the damaged one.
It should work now.
Thank you! I have just tried the new version. On Android (i haven't checked iOS), I get an error on the page where the banner is supposed to be displayed.
System.Exception: 'MTAdmob not initialised. You need to initilise it by calling CrossMauiMTAdmob.Current.Init in your platform projects!'
Hi Enrico,
The error is quite clear. In your android project you need to call CrossMauiMTAdmob.Current.Init(...)
This is because of the mandatory consent required by Google. Instead of calling mobileads.init, call this new one and the library will take care of the rest.
Please, remember that from the 16th of January, you need to ask consent to the EU users...the licences version of the plugin can do it, otherwise you need to add your implementation of a certified CMP.
I hope it helps, otherwise let me know and I'll be happy to help.
Marco
On Sat, 27 Jan 2024, 18:15 Enrico Rossini, @.***> wrote:
Thank you! I have just tried the new version. On Android, I get an error in the page where the banner is supposed to be displayed.
System.Exception: 'MTAdmob not initialised. You need to initilise it by calling CrossMauiMTAdmob.Current.Init in your platform projects!'
image.png (view on web) https://github.com/marcojak/MauiMTAdmob/assets/9497415/9d5a974b-cbe7-4a85-9c9c-b1ec65556c7a
โ Reply to this email directly, view it on GitHub https://github.com/marcojak/MauiMTAdmob/issues/58#issuecomment-1913264123, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAUIPIVVGTAZD6USPUOXI6DYQUYZPAVCNFSM6AAAAABCL6FUPOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJTGI3DIMJSGM . You are receiving this because you commented.Message ID: @.***>
I have
MobileAds.Initialize(this);
So, I have to change it, right?
Correct.
The library will then call it for you. If you have the licensed version, it will ask for consent and then, if given, will call it. The unlicensed version will just call it, but you need to ask for the consent implementing it, possibly before calling the init method.
On Sat, 27 Jan 2024, 18:22 Enrico Rossini, @.***> wrote:
I have
MobileAds.Initialize(this);
So, I have to change it, right?
โ Reply to this email directly, view it on GitHub https://github.com/marcojak/MauiMTAdmob/issues/58#issuecomment-1913266003, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAUIPIVQKHUSRNSOFX3EKZTYQUZWDAVCNFSM6AAAAABCL6FUPOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJTGI3DMMBQGM . You are receiving this because you commented.Message ID: @.***>
When do you think the Rewarding will be fixed for iOS? ๐
Is this correct for Android?
CrossMauiMTAdmob.Current.Init(this, Constants.ApplicationId, Constants.MauiMTAdmobLicence);
and yes, I got a licence ๐
What is the call for iOS?
In my code I have a generic function
public void InitAdv(bool setEvents = true)
{
_shouldSetEvents = setEvents;
#if ANDROID || IOS
CrossMauiMTAdmob.Current.TagForChildDirectedTreatment = MTTagForChildDirectedTreatment.TagForChildDirectedTreatmentTrue;
CrossMauiMTAdmob.Current.TagForUnderAgeOfConsent = MTTagForUnderAgeOfConsent.TagForUnderAgeOfConsentTrue;
CrossMauiMTAdmob.Current.MaxAdContentRating = MTMaxAdContentRating.MaxAdContentRatingPg;
#endif
}
with the new update, the banner is not displayed but the rewording yes.
That's perfect.
There are additional parameters in case you want to do some tests. They allow you to test the case for European and non European users.
Instead, if you are ready for release time, the parameters you used are perfect.
Remember to do the same for iOS if your app runs on that platform too.
On Sat, 27 Jan 2024, 18:49 Enrico Rossini, @.***> wrote:
Is this correct?
CrossMauiMTAdmob.Current.Init(this, Constants.ApplicationId, Constants.MauiMTAdmobLicence);
and yes, I got a licence ๐
โ Reply to this email directly, view it on GitHub https://github.com/marcojak/MauiMTAdmob/issues/58#issuecomment-1913273830, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAUIPIQDFU6KZKCV5Q6HLSTYQU44BAVCNFSM6AAAAABCL6FUPOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJTGI3TGOBTGA . You are receiving this because you commented.Message ID: @.***>
From version 1.1.0, because you cannot show ads until you have the consent, you need to manually load the banner.
YourAdview.LoadAds() will allow you to load the banner.
On Sat, 27 Jan 2024, 19:17 Marco Troncone, @.***> wrote:
That's perfect.
There are additional parameters in case you want to do some tests. They allow you to test the case for European and non European users.
Instead, if you are ready for release time, the parameters you used are perfect.
Remember to do the same for iOS if your app runs on that platform too.
On Sat, 27 Jan 2024, 18:49 Enrico Rossini, @.***> wrote:
Is this correct?
CrossMauiMTAdmob.Current.Init(this, Constants.ApplicationId, Constants.MauiMTAdmobLicence);
and yes, I got a licence ๐
โ Reply to this email directly, view it on GitHub https://github.com/marcojak/MauiMTAdmob/issues/58#issuecomment-1913273830, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAUIPIQDFU6KZKCV5Q6HLSTYQU44BAVCNFSM6AAAAABCL6FUPOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJTGI3TGOBTGA . You are receiving this because you commented.Message ID: @.***>
Closing as fixed in 1.1.1
I saw you released the version 1.1.0 of your component. So, I updated it but there are some issues with the dependencies:
I reverted to 1.0.4 and the app is working as usual.