Anas khan
Anas khan

Reputation: 195

How to add admob ads to Xamarin IOS

I am trying to add Admob Ads to Xamarin.IOS but i am unable to figure out way to achieve this goal.I have already searched internet but couldnt find the solution

Upvotes: 3

Views: 1355

Answers (1)

Lucas Zhang
Lucas Zhang

Reputation: 18861

Google Admob is available in Xamarin.iOS .

1.install the package Xamarin.Firebase.iOS.AdMob from nuget.

2.Registring with AdMob

So, the first thing that you will need to do is actually register for AdMob. This is the same thing that I did in Android, but I created an iOS project. This will give you two important pieces of information, your “Application Code” and your “Ad Unit Id”. We will use these later, but simply go to: https://apps.admob.com, register for a new app, link to an app in Firebase, and you will be off running.

3.Add GoogleService-Info.plist

When you create the new app in Admob/Firebase there will be a Google Service config plist file that gets downloaded. Add this to the root of your iOS project and make sure that the Build Action is set to BundleResource. This is super important!

4.Update AppDelegate

MobileAds.Configure("Your Publishing App Id");

You can ask for more details about Admob . And here is a sample that you can refer.

Upvotes: 3

Related Questions