Intro

With this Plugin you can add Google Admob Ads inside your MAUI Android and iOS apps with a single line!!! This plugin supports: Banners, Native Ads, Open Ads, Interstitial, Rewarded Videos and Rewarded Interstitials

Commercial support

If you need faster support with this plugin, or custom changes or you would like to hire me to help with the development of your project, contact me at [email protected] to discuss it further.

Important

From version 1.1.0, I've added support for the consent required by Google for all the final users living in Europe. This support for UMP is only available in the licensed version of the plugin. Without the license, the plugin will continue to work as usual with all the other features normally available. This will allow me to continue supporting the development of the plugin. You can buy the license here. If you are a charity or your app is used to support a good cause, contact me and I'll verify and send you a free license.

If you are not ready to buy a license, if possible, please, support my work with a few coffees or even better with a Membership! You can do it here: Buy Me A Coffee

Your help allows me to continue to spend time on this project and continue to maintain and update it with new features.

Cryptography

This plugin uses a cryptographic algorithm to handle the license.

Current Status

Latest version: 1.7.0

Android iOS Windows Mac
Banner
Native Ads
Interstitial
Rewarded
Rewarded Interstitial *
Open Ads
UMP Consent

*They are implemented but currently, they are not working. Probably something in the Admob SDK. I'm investigating it.

Methods

General

Init
SetAppMuted
SetAppVolume

Ads

Banner Interstitial Rewarded Rewarded Interstitial
LoadAd LoadInterstitial LoadRewarded LoadRewardedInterstitial
  ShowInterstitial ShowRewarded ShowRewardedInterstitial
  IsInterstitialLoaded IsRewardedLoaded IsRewardedInterstitialLoaded
  GetNumberOfInterstitialsLoaded GetNumberOfRewardedLoaded GetNumberOfRewardedInterstitialsLoaded
  EmptyInterstitialAdsList EmptyRewardedAdsList EmptyRewardedInterstitialsAdsList  

Native Ads App Open Ads
LoadNativeAd -
LoadNativeAds  

Consent
InitialiseConsent
InitialiseAndShowConsentForm
ShowPrivacyOptionsForm
Reset

Events

Ads

Banner Interstitial Rewarded Rewarded Interstitial App Open Ads
AdsLoaded OnInterstitialLoaded OnRewardedLoaded OnRewardedLoaded OnAppOpenAdLoaded
AdsFailedToLoad OnInterstitialFailedToLoad OnRewardedFailedToLoad OnRewardedFailedToLoad OnAppOpenFailedToLoad
AdsImpression OnInterstitialImpression OnRewardedImpression OnRewardedImpression OnAppOpenImpression**
AdsClicked OnInterstitialOpened OnRewardedOpened OnRewardedOpened OnAppOpenOpened**
AdsOpened OnInterstitialFailedToShow OnRewardedFailedToShow OnRewardedFailedToShow OnAppOpenFailedToShow**
AdsClosed OnInterstitialClosed OnRewardedClosed OnRewardedClosed OnAppOpenClosed**
AdsSwiped OnInterstitialClicked* OnRewardedClicked* OnRewardedClicked* OnAppOpenClicked**
OnUserEarnedReward OnUserEarnedReward

*Only supported on iOS

**Currently only working on Android. I plan to add them on iOS in the next version

Consent
OnConsentInfoUpdateSuccess
OnConsentInfoUpdateFailure
OnConsentFormDismissed
OnConsentFormLoadSuccess
OnConsentFormLoadFailure

Initialization

First of all, in your MauiProgramm class, add

.UseMauiMTAdmob()

to the builder.

To initialise the plugin, you need to call the init method in both your platforms.

Android Method Signature

void Init(MauiAppCompatActivity activity, string appId, string license = null, string nativeAdsId = null, string openAdsId = null, bool enableOpenAds = false, bool tagForUnderAgeOfConsent = false, string testDeviceId = null, bool forceTesting = false, DebugGeography geography = DebugGeography.DEBUG_GEOGRAPHY_DISABLED, bool initialiseConsentAtStartup = true);

Parameters

Parameter Type Description Default Value
activity MauiAppCompatActivity The activity to initialize the plugin with. N/A
appId string The AdMob app ID. N/A
license string The license key. null
openAdsId string The open ads ID. null
nativeAdsId string The native ads ID. null
enableOpenAds bool True to enable open ads, false otherwise. false
tagForUnderAgeOfConsent bool True to tag for under age of consent, false otherwise. false
testDeviceId string The test device ID. null
forceTesting bool True to force testing, false otherwise. false
geography DebugGeography The debug geography. DebugGeography.DEBUG_GEOGRAPHY_DISABLED
initialiseConsentAtStartup bool True to initialize consent at startup, false otherwise. true

iOS Method Signature

void Init(string license = null, string nativeAdsId = null, string openAdsId = null, bool enableOpenAds = false, bool tagForUnderAgeOfConsent = false, string testDeviceId = null, DebugGeography geography = DebugGeography.DEBUG_GEOGRAPHY_DISABLED, bool initialiseConsentAtStartup = true);

Parameters

Parameter Type Description Default Value
license string The license key. null
openAdsId string The open ads ID. null
nativeAdsId string The native ads ID. null
enableOpenAds bool True to enable open ads, false otherwise. false
tagForUnderAgeOfConsent bool True to tag for under age of consent, false otherwise. false
testDeviceId string The test device ID. null
geography DebugGeography The debug geography. DebugGeography.DEBUG_GEOGRAPHY_DISABLED
initialiseConsentAtStartup bool True to initialize consent at startup, false otherwise. true

Please note:

You don't need to call:

MobileAds.Initialize(this); (Android)

or

MobileAds.SharedInstance.Start(CompletionHandler); (iOS)

The plugin will do it for you!

Add your App Id

  • Android

You need to add your Admob APPLICATION_ID to your AppManifest:

<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="YOUR APPLICATION ID" />
  • iOS

You need to add GADApplicationIdentifier to your Info.plist. Edit your info.plist adding these Keys:

<key>GADApplicationIdentifier</key>
<string>YOUR APPLICATION ID</string>
<key>GADIsAdManagerApp</key>
<true/>

Banners

To add a Banner on a page you have two options:

  • XAML
<controls:MTAdView x:Name="myAds"></controls:MTAdView>

remember to add this line in your XAML:

xmlns:controls="clr-namespace:Plugin.MauiMTAdmob.Controls;assembly=Plugin.MauiMTAdmob"
  • Code
MTAdView ads = new MTAdView();

Now you can add the control to your layout.

IMPORTANT

To test the banner, during development, you can use the test Banner Id. Just remember to replace them with your IDs:

Android: ca-app-pub-3940256099942544/6300978111

iOS: ca-app-pub-3940256099942544/2934735716

Collapsible Banners (Licensed version only)

You can show a collapsible banner calling:

myAds.LoadAd(CollapsibleBannerMode.Top);

CollapsibleBannerMode can have the following values: None, Top, Bottom.

PROPERTIES

For each AdView if you want, you can set the following properties:

AdsId: To add the id of your ads.

AdSize: To choose the size of your banners.

AutoSize: If true, the plugin will update the banner height according to the ads loaded.

GLOBAL PROPERTIES

AdsId: To add the id of your ads

PersonalizedAds: You can set it to False if you want to use generic ads (for GDPR...)

TestDevices: You can add here the ID of your test devices

UseRestrictedDataProcessing: For compliance with the CCPA

You can use Global Properties in this way:

CrossMauiMTAdmob.Current.UserPersonalizedAds = true;

IMTAdmob Interstitials Documentation

This documentation provides an overview of how to use interstitial ads with the CrossMauiMTAdmob.Current interface.

Loading an Interstitial Ad

To load an interstitial ad, use the LoadInterstitial method with the specified ad unit:

void LoadInterstitial(string adUnit);

Example:

CrossMauiMTAdmob.Current.LoadInterstitial("your-ad-unit-id");

Checking if an Interstitial Ad is Loaded

To check if an interstitial ad is loaded, use the IsInterstitialLoaded method:

bool IsInterstitialLoaded();

Example:

bool isLoaded = CrossMauiMTAdmob.Current.IsInterstitialLoaded();
if (isLoaded) {
    // Interstitial ad is loaded
}

Showing an Interstitial Ad

To show the loaded interstitial ad, use the ShowInterstitial method:

void ShowInterstitial();

Example:

if (CrossMauiMTAdmob.Current.IsInterstitialLoaded()) {
    CrossMauiMTAdmob.Current.ShowInterstitial();
}

Handling Interstitial Ad Events

The plugin provides several events to handle interstitial ad lifecycle events:

  • event EventHandler OnInterstitialLoaded: Raised when an interstitial ad is loaded.
  • event EventHandler<MTEventArgs> OnInterstitialFailedToLoad: Raised when an interstitial ad fails to load.
  • event EventHandler OnInterstitialOpened: Raised when an interstitial ad is opened.
  • event EventHandler OnInterstitialClosed: Raised when an interstitial ad is closed.
  • event EventHandler<MTEventArgs> OnInterstitialFailedToShow: Raised when an interstitial ad fails to show.
  • event EventHandler OnInterstitialImpression: Raised when an interstitial ad impression occurs.
  • event EventHandler OnInterstitialClicked: Raised when an interstitial ad is clicked.

Example:

CrossMauiMTAdmob.Current.OnInterstitialLoaded += (sender, args) => {
    // Handle interstitial ad loaded
};

CrossMauiMTAdmob.Current.OnInterstitialFailedToLoad += (sender, args) => {
    // Handle interstitial ad failed to load
};

CrossMauiMTAdmob.Current.OnInterstitialOpened += (sender, args) => {
    // Handle interstitial ad opened
};

CrossMauiMTAdmob.Current.OnInterstitialClosed += (sender, args) => {
    // Handle interstitial ad closed
};

CrossMauiMTAdmob.Current.OnInterstitialFailedToShow += (sender, args) => {
    // Handle interstitial ad failed to show
};

CrossMauiMTAdmob.Current.OnInterstitialImpression += (sender, args) => {
    // Handle interstitial ad impression
};

CrossMauiMTAdmob.Current.OnInterstitialClicked += (sender, args) => {
    // Handle interstitial ad clicked
};

Getting the Number of Interstitials Loaded

To get the number of interstitials loaded, use the GetNumberOfInterstitialsLoaded method:

int GetNumberOfInterstitialsLoaded();

Example:

int numberOfInterstitials = CrossMauiMTAdmob.Current.GetNumberOfInterstitialsLoaded();

Only the licensed version allows to load multiple interstitials and show them when needed.


Emptying the Interstitial Ads List

To empty the interstitial ads list, use the EmptyInterstitialAdsList method:

void EmptyInterstitialAdsList();

Example:

CrossMauiMTAdmob.Current.EmptyInterstitialAdsList();

Use this method to clear the list of loaded interstitial ads. Normally you don't need to use it as the library automatically removes loaded ads that are too old (1 hour) as they might be not valid anymore.

Rewarded Ads

This documentation provides an overview of how to use rewarded ads with the CrossMauiMTAdmob.Current interface.

Loading a Rewarded Ad

To load a rewarded ad, use the LoadRewarded method with the specified ad unit:

void LoadRewarded(string adUnit);

Example:

CrossMauiMTAdmob.Current.LoadRewarded("your-ad-unit-id");

Checking if a Rewarded Ad is Loaded

To check if a rewarded ad is loaded, use the IsRewardedLoaded method:

bool IsRewardedLoaded();

Example:

bool isLoaded = CrossMauiMTAdmob.Current.IsRewardedLoaded();
if (isLoaded) {
    // Rewarded ad is loaded
}

Showing a Rewarded Ad

To show the loaded rewarded ad, use the ShowRewarded method:

void ShowRewarded();

Example:

if (CrossMauiMTAdmob.Current.IsRewardedLoaded()) {
    CrossMauiMTAdmob.Current.ShowRewarded();
}

Handling Rewarded Ad Events

The plugin provides several events to handle rewarded ad lifecycle events:

  • event EventHandler OnRewardedLoaded: Raised when a rewarded ad is loaded.
  • event EventHandler<MTEventArgs> OnRewardedFailedToLoad: Raised when a rewarded ad fails to load.
  • event EventHandler OnRewardedOpened: Raised when a rewarded ad is opened.
  • event EventHandler OnRewardedClosed: Raised when a rewarded ad is closed.
  • event EventHandler<MTEventArgs> OnRewardedFailedToShow: Raised when a rewarded ad fails to show.
  • event EventHandler OnRewardedImpression: Raised when a rewarded ad impression occurs.
  • event EventHandler OnRewardedClicked: Raised when a rewarded ad is clicked.
  • event EventHandler<RewardEventArgs> OnUserEarnedReward: Raised when the user earns a reward.

Example:

CrossMauiMTAdmob.Current.OnRewardedLoaded += (sender, args) => {
    // Handle rewarded ad loaded
};

CrossMauiMTAdmob.Current.OnRewardedFailedToLoad += (sender, args) => {
    // Handle rewarded ad failed to load
};

CrossMauiMTAdmob.Current.OnRewardedOpened += (sender, args) => {
    // Handle rewarded ad opened
};

CrossMauiMTAdmob.Current.OnRewardedClosed += (sender, args) => {
    // Handle rewarded ad closed
};

CrossMauiMTAdmob.Current.OnRewardedFailedToShow += (sender, args) => {
    // Handle rewarded ad failed to show
};

CrossMauiMTAdmob.Current.OnRewardedImpression += (sender, args) => {
    // Handle rewarded ad impression
};

CrossMauiMTAdmob.Current.OnRewardedClicked += (sender, args) => {
    // Handle rewarded ad clicked
};

CrossMauiMTAdmob.Current.OnUserEarnedReward += (sender, args) => {
    // Handle user earned reward
    var reward = args.Reward;
    // reward.Type and reward.Amount
};

Getting the Number of Rewarded Ads Loaded

To get the number of rewarded ads loaded, use the GetNumberOfRewardedLoaded method:

int GetNumberOfRewardedLoaded();

Example:

int numberOfRewarded = CrossMauiMTAdmob.Current.GetNumberOfRewardedLoaded();

Only the licensed version allows to load multiple rewarded ads and show them when needed.


Emptying the Rewarded Ads List

To empty the rewarded ads list, use the EmptyRewardedAdsList method:

void EmptyRewardedAdsList();

Example:

CrossMauiMTAdmob.Current.EmptyRewardedAdsList();

Use this method to clear the list of loaded rewarded ads. Normally you don't need to use it as the library automatically removes loaded ads that are too old (1 hour) as they might be not valid anymore.

Rewarded Interstitial Ads

This documentation provides an overview of how to use rewarded interstitial ads

Loading a Rewarded Interstitial Ad

To load a rewarded interstitial ad, use the LoadRewardedInterstitial method with the specified ad unit:

void LoadRewardedInterstitial(string adUnit);

Example:

CrossMauiMTAdmob.Current.LoadRewardedInterstitial("your-ad-unit-id");

Checking if a Rewarded Interstitial Ad is Loaded

To check if a rewarded interstitial ad is loaded, use the IsRewardedInterstitialLoaded method:

bool IsRewardedInterstitialLoaded();

Example:

bool isLoaded = CrossMauiMTAdmob.Current.IsRewardedInterstitialLoaded();
if (isLoaded) {
    // Rewarded interstitial ad is loaded
}

Showing a Rewarded Interstitial Ad

To show the loaded rewarded interstitial ad, use the ShowRewardedInterstitial method:

void ShowRewardedInterstitial();

Example:

if (CrossMauiMTAdmob.Current.IsRewardedInterstitialLoaded()) {
    CrossMauiMTAdmob.Current.ShowRewardedInterstitial();
}

Handling Rewarded Interstitial Ad Events

The plugin provides several events to handle rewarded interstitial ad lifecycle events:

  • event EventHandler OnRewardedInterstitialLoaded: Raised when a rewarded interstitial ad is loaded.
  • event EventHandler<MTEventArgs> OnRewardedInterstitialFailedToLoad: Raised when a rewarded interstitial ad fails to load.
  • event EventHandler OnRewardedInterstitialOpened: Raised when a rewarded interstitial ad is opened.
  • event EventHandler OnRewardedInterstitialClosed: Raised when a rewarded interstitial ad is closed.
  • event EventHandler<MTEventArgs> OnRewardedInterstitialFailedToShow: Raised when a rewarded interstitial ad fails to show.
  • event EventHandler OnRewardedInterstitialImpression: Raised when a rewarded interstitial ad impression occurs.
  • event EventHandler OnRewardedInterstitialClicked: Raised when a rewarded interstitial ad is clicked.
  • event EventHandler<RewardEventArgs> OnUserEarnedReward: Raised when the user earns a reward.

Example:

CrossMauiMTAdmob.Current.OnRewardedInterstitialLoaded += (sender, args) => {
    // Handle rewarded interstitial ad loaded
};

CrossMauiMTAdmob.Current.OnRewardedInterstitialFailedToLoad += (sender, args) => {
    // Handle rewarded interstitial ad failed to load
};

CrossMauiMTAdmob.Current.OnRewardedInterstitialOpened += (sender, args) => {
    // Handle rewarded interstitial ad opened
};

CrossMauiMTAdmob.Current.OnRewardedInterstitialClosed += (sender, args) => {
    // Handle rewarded interstitial ad closed
};

CrossMauiMTAdmob.Current.OnRewardedInterstitialFailedToShow += (sender, args) => {
    // Handle rewarded interstitial ad failed to show
};

CrossMauiMTAdmob.Current.OnRewardedInterstitialImpression += (sender, args) => {
    // Handle rewarded interstitial ad impression
};

CrossMauiMTAdmob.Current.OnRewardedInterstitialClicked += (sender, args) => {
    // Handle rewarded interstitial ad clicked
};

CrossMauiMTAdmob.Current.OnUserEarnedReward += (sender, args) => {
    // Handle user earned reward
    var reward = args.Reward;
    // reward.Type and reward.Amount
};

Getting the Number of Rewarded Interstitial Ads Loaded

To get the number of rewarded interstitial ads loaded, use the GetNumberOfRewardedInterstitialsLoaded method:

int GetNumberOfRewardedInterstitialsLoaded();

Example:

int numberOfRewardedInterstitials = CrossMauiMTAdmob.Current.GetNumberOfRewardedInterstitialsLoaded();

Only the licensed version allows to load multiple rewarded interstitial ads and show them when needed.


Emptying the Rewarded Interstitial Ads List

To empty the rewarded interstitial ads list, use the EmptyRewardedInterstitialAdsList method:

void EmptyRewardedInterstitialAdsList();

Example:

CrossMauiMTAdmob.Current.EmptyRewardedInterstitialAdsList();

Use this method to clear the list of loaded rewarded interstitial ads. Normally you don't need to use it as the library automatically removes loaded ads that are too old (1 hour) as they might be not valid anymore.

App Open Ads

App Open Ads are only available in the licensed version of the plugin.
To enable the App Open Ads in you apps, you can buy the license here.

The plugin provides functionality to load and display App Open ads in an Android and iOS application, while handling ad loading callbacks and error handling.

To initialize the Open Ads in your app, you need to set the corresponding variable enableOpenAds in

CrossMauiMTAdmob.Current.Init(...)

In the same Init, you also need to pass your Open App Id in openAdsId.

To load and show your Open Ads when the app starts or goes into foreground, you need the following code:

Android

protected override void OnResume()
{
base.OnResume();
CrossMauiMTAdmob.Current.OnResume();
}

iOS

public override void OnActivated(UIApplication application)
{
base.OnActivated(application);
CrossMauiMTAdmob.Current.OnResume();
}

Methods

None

Events

  • OnAppOpenAdLoaded: Event raised when an app open ad is loaded.
  • OnAppOpenOpened: Event raised when an app open ad is opened.
  • OnAppOpenClosed: Event raised when an app open ad is closed.
  • OnAppOpenFailedToLoad: Event raised when an app open ad fails to load.
  • OnAppOpenFailedToShow: Event raised when an app open ad fails to show.
  • OnAppOpenImpression: Event raised when an app open ad impression occurs.
  • OnAppOpenClicked: Event raised when an app open ad is clicked.

IMTAdmob Native Ads Documentation

This documentation provides an overview of how to use native ads with the CrossMauiMTAdmob.Current interface.

Loading a Native Ad

To load a native ad, use the LoadNativeAd method:

void LoadNativeAd();

Example:

CrossMauiMTAdmob.Current.LoadNativeAd();

Loading Multiple Native Ads

To load up to 5 native ads (only on Android), use the LoadNativeAds method:

void LoadNativeAds(int count);

Example:

CrossMauiMTAdmob.Current.LoadNativeAds(5);

Showing a Native Ad

To show a loaded native ad, use the ShowNativeAd method:

void ShowNativeAd();

Example:

myNativeAds.ShowNativeAd();

Handling Native Ad Events

The plugin provides several events to handle native ad lifecycle events:

  • event EventHandler OnNativeAdLoaded: Raised when a native ad is loaded.
  • event EventHandler OnNativeAdOpened: Raised when a native ad is opened.
  • event EventHandler OnNativeAdClosed: Raised when a native ad is closed.
  • event EventHandler<MTEventArgs> OnNativeAdFailedToLoad: Raised when a native ad fails to load.
  • event EventHandler<MTEventArgs> OnNativeAdFailedToShow: Raised when a native ad fails to show.
  • event EventHandler OnNativeAdImpression: Raised when a native ad impression occurs.
  • event EventHandler OnNativeAdClicked: Raised when a native ad is clicked.

Example:

CrossMauiMTAdmob.Current.OnNativeAdLoaded += (sender, args) => {
    // Handle native ad loaded
};

CrossMauiMTAdmob.Current.OnNativeAdOpened += (sender, args) => {
    // Handle native ad opened
};

CrossMauiMTAdmob.Current.OnNativeAdClosed += (sender, args) => {
    // Handle native ad closed
};

CrossMauiMTAdmob.Current.OnNativeAdFailedToLoad += (sender, args) => {
    // Handle native ad failed to load
};

CrossMauiMTAdmob.Current.OnNativeAdFailedToShow += (sender, args) => {
    // Handle native ad failed to show
};

CrossMauiMTAdmob.Current.OnNativeAdImpression += (sender, args) => {
    // Handle native ad impression
};

CrossMauiMTAdmob.Current.OnNativeAdClicked += (sender, args) => {
    // Handle native ad clicked
};

Consent and Ump

Under the Google EU User Consent Policy, you must make certain disclosures to your users in the European Economic Area (EEA) along with the UK and obtain their consent to use cookies or other local storage, where legally required, and to use personal data (such as AdID) to serve ads. The licensed version of the plugin allows you to automatically ask consent to your users that need to provide it (EEA & UK).


To enable this feature and automatically request the consent on your apps, you can buy the license here.

Requesting User Consent

The consent is requested automatically when you init the plugin. If you prefer, you can avoid to show the consent at startup (set the corresponding parameter in the Init method) and show it at a later time.

To request user consent, use the InitialiseAndShowConsentForm method:

void InitialiseAndShowConsentForm();

Example:

CrossMauiMTAdmob.Current.InitialiseAndShowConsentForm();

Checking User Consent Status

To check the current user consent status, use the GetConsentStatus method:

ConsentStatus GetConsentStatus();

Example:

ConsentStatus status = CrossMauiMTAdmob.Current.GetConsentStatus();
if (status == ConsentStatus.Obtained) {
    // User has granted consent
} else {
    // User has not granted consent
}

Handling Consent Events

The plugin provides several events to handle user consent lifecycle events:

  • event EventHandler OnConsentFormLoaded: Raised when the consent form is loaded.
  • event EventHandler<MTEventArgs> OnConsentFormLoadFailed: Raised when the consent form fails to load.
  • event EventHandler OnConsentFormOpened: Raised when the consent form is opened.
  • event EventHandler OnConsentFormClosed: Raised when the consent form is closed.
  • event EventHandler<MTEventArgs> OnConsentFormError: Raised when there is an error with the consent form.

Example:

CrossMauiMTAdmob.Current.OnConsentFormLoaded += (sender, args) => {
    // Handle consent form loaded
};

CrossMauiMTAdmob.Current.OnConsentFormLoadFailed += (sender, args) => {
    // Handle consent form load failed
};

CrossMauiMTAdmob.Current.OnConsentFormOpened += (sender, args) => {
    // Handle consent form opened
};

CrossMauiMTAdmob.Current.OnConsentFormClosed += (sender, args) => {
    // Handle consent form closed
};

CrossMauiMTAdmob.Current.OnConsentFormError += (sender, args) => {
    // Handle consent form error
};

Known issues and fix

iOS: Error: clang++ exited with code 1: Undefined symbols for architecture arm64: "OBJC_CLASS$_UMPConsentForm"...
If you get this error, simply add the package
"Xamarin.Google.iOS.UserMessagingPlatform" Version="1.1.0.1"
to your iOS project.
iOS: The '_GoogleUserMessagingPlatformAssemblyName' start tag on line 3 position 6 does not match the end tag of '_GoogleMobileAdsAssemblyName'. Line 3, position 132. /packages/xamarin.google.ios.usermessagingplatform/1.1.0.1/buildTransitive/Xamarin.Google.iOS.UserMessagingPlatform.targets
In your nuget cache, open the file "xamarin.google.ios.usermessagingplatform\1.1.0.1\buildTransitive\Xamarin.Google.iOS.UserMessagingPlatform.targets"
Replace the line
<_GoogleUserMessagingPlatformAssemblyName> Google.UserMessagingPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
with
<_GoogleUserMessagingPlatformAssemblyName>Google.UserMessagingPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
.Net 7: Error: Detected package downgrade: Xamarin.AndroidX.Lifecycle.LiveData from 2.6.2.3 to 2.5.1.1. Reference the package directly from the project to select a different version.
In your Android project, import the package:
Xamarin.AndroidX.Lifecycle.LiveData Version="2.6.2.3"
Error in ...\xamarin.androidx.lifecycle.common\2.6.2.3\buildTransitive\net7.0-android33.0\..\..\jar\androidx.lifecycle.lifecycle-common.jar:androidx/lifecycle/DispatchQueue.class: Type androidx.lifecycle.DispatchQueue is defined multiple times
In your Android project, import the packages:
"Xamarin.AndroidX.Activity" Version="1.8.2"
"Xamarin.AndroidX.Activity.Ktx" Version="1.8.2"