0
votes

I am using the AlexTouch.googleAdMobAds project for displaying ads. Unfortunately it shows the error below:

static  UIWindow  window;
    static GADBannerView adViewWindow; 

    static  bool adOnWindow = false;

enter image description here

Error: Error CS0012: The type MonoTouch.UIKit.UIView' is defined in an assembly that is not referenced. Consider adding a reference to assemblymonotouch, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' (CS0012) (OnlineVideos.Ui)

How can I solve this issue? Can anyone help please?

1
FYI: Do not post errors as screen snapshots as the search indexing will not be able to help other users that have this same issue. - SushiHangover

1 Answers

0
votes

Add a using clause to include UIKit:

using UIKit;

Xamarin.iOS Only Nuget:

<package id="Xamarin.Google.iOS.MobileAds" version="7.6.0.1" targetFramework="xamarinios10" /> 

UPDATE 2: Xamarinos.AdMob.FormsPlugin Nuget

A Xamarin.Forms based PCL version @ https://github.com/LosXamarinos/Xamarinos.AdMob.FormsPlugin

Nuget: https://www.nuget.org/packages/Xamarinos.AdMob.FormsPlugin/

UPDATE: See this forum thread concerning AlexTouch.GoogleAdMobAds being outdated:

https://forums.xamarin.com/discussion/7935/admob-with-alextouch-googleadmobads

I am the author of AlexTouch.GoogleAdMobAds it is really outdated now please use either the component

https://components.xamarin.com/view/googleadmob/

or the more up to date binding

https://github.com/mono/monotouch-bindings/tree/master/GoogleAdMobAds

I would suggest the component over the manual binding it's just easier ;)