Coder Social home page Coder Social logo

mg-code-solutions / mgadmob Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 1.0 654 KB

Utilise Google Admob Ads (banners, interstitial, and rewarded videos) in your Xamarin Projects (Android and iOS)

License: MIT License

C# 100.00%
xamarin xamarin-forms xamarin-android xamarin-ios plugin mgadmob ads admob banner-ads interstitial-ads

mgadmob's Introduction

MgAdmob plugin for Xamarin (Android & iOS)

Utilise Google Admob Ads (banners, interstitial, and rewarded videos) in your Xamarin Projects (Android and iOS)

Originally based on the MtAdmob project

Setup

This plugin supports:

  • Xamarin.Android
  • Xamarin.iOS

How to Use MgAdMob Banner Ads

There are two options available for adding banner ads to your app

1) XAML

Remember to replace ca-app-pub-xxxxxxxxxxxxxxxx/yyyyyyyyyy with your Ad Unit Id from Google Admob

<controls:MgAdView AdUnitId="ca-app-pub-xxxxxxxxxxxxxxxx/yyyyyyyyyy"/>

Add this line in your XAML:

xmlns:controls="clr-namespace:Plugin.MgAdmob.Controls;assembly=Plugin.MgAdmob"

MgBannerAdView AdUnitId can be customised for Android and iOS by using the OnPlatform tag as shown in the example below (test Ad Unit Ids shown):

<controls:MgBannerAdView 	
	AdUnitId="{OnPlatform Android='ca-app-pub-3940256099942544/6300978111', iOS='ca-app-pub-3940256099942544/2934735716'}"
	/>

Alternatively, for all banners in your app you can set the AdUnitId property via a <Style> entry in App.xaml (similar to HeightRequest as explained below)

Styling the MgBannerAdView control in App.xaml

NB: Banner ads are somewhat particular about their sizing. If banners ads are not displaying, try defaulting the HeightRequest by adding the following style to your App.xaml:

<Style TargetType="MgBannerAdView">
    <Setter Property="HeightRequest">
        <Setter.Value>
            <x:OnIdiom Phone="60" Tablet="90"/>
        </Setter.Value>
    </Setter>
</Style>

2) Code

MgBannerAdView ads = new MgBannerAdView();

How to Use MgAdMob Full Screen Ads

Interstitial ads

To load an Interstitial Ad, use the following (replacing xx-xxx-xxx-xxxxxxxxxxxxxxxxx/xxxxxxxxxx with your Ad Unit Id from Google Admob):

CrossMgAdmob.Current.LoadInterstitial("xx-xxx-xxx-xxxxxxxxxxxxxxxxx/xxxxxxxxxx");

Once loaded, an Interstitial Ad can be displayed as shown below:

CrossMgAdmob.Current.ShowInterstitial();

NB: Intersitial Ads may take some time to load: to avoid UX delays, load the ad early in the program flow and then show the ad at the appropriate time later

Rewarded video ads

To load a Reqard Video Ad, use the following (replacing xx-xxx-xxx-xxxxxxxxxxxxxxxxx/xxxxxxxxxx with your Ad Unit Id from Google Admob):

CrossMgAdmob.Current.LoadRewardedVideo("xx-xxx-xxx-xxxxxxxxxxxxxxxxx/xxxxxxxxxx");

Once loaded, a Rewarded Video Ad can be displayed as shown below:

CrossMgAdmob.Current.ShowRewardedVideo();

NB: Reward Video Ads may take some time to load: to avoid UX delays, load the ad early in the program flow and then show the ad at the appropriate time later

Ad Unit Ids

When testing, use the following Ad Unit Ids, provided by Google. When releasing to production, replace the test Ad Unit Ids with your own Ids from Google AdMob:

Banner Ad Test Ids

Android: ca-app-pub-3940256099942544/6300978111
iOS: ca-app-pub-3940256099942544/2934735716

Interstitial Ad Test Ids

Android: ca-app-pub-3940256099942544/1033173712
iOS: ca-app-pub-3940256099942544/4411468910

Rewarded Video Ad Test Ids

Android: ca-app-pub-3940256099942544/5224354917
iOS: ca-app-pub-3940256099942544/1712485313

Properties

Global Properties

IsEnabled

(default: true): true / false - enables or disables the loading / displaying of ads

AdUnitId

(default: null): Ad Unit Id to be used for all MgBannerAdViews, can be overridden by setting the AdUnitId on the MgBannerAdView control

UsePersonalisedAds

(default: false): true / false - used to influence whether Google Ads uses personalised ads or generic ads

UseRestrictedDataProcessing

(default: true): true / false - TODO

ComplyWithFamilyPolicies

(default: true): true / false - specify whether Google Ads should comply with Family Policies

TagForChildDirectedTreatment

(default: TreatmentUnspecified): MgTagForChildDirectedTreatment enum - TODO

TagForUnderAgeOfConsent

(default: ConsentUnspecified): MgTagForUnderAgeOfConsent enum - TODO

MaxAdContentRating

(default: RatingG): MgMaxAdContentRating enum - maximum rating that displayed ads can be

TestDevices

(default: empty list): list of string entries representing test device ids

Global properties can be used as shown below:

CrossMgAdmob.Current.TagForChildDirectedTreatment = MgTagForChildDirectedTreatment.TreatmentUnspecified;
CrossMgAdmob.Current.TagForUnderAgeOfConsent = MgTagForUnderAgeOfConsent.ConsentUnspecified;
CrossMgAdmob.Current.MaxAdContentRating = MgMaxAdContentRating.RatingG;
CrossMgAdmob.Current.UsePersonalisedAds = false;
CrossMgAdmob.Current.ComplyWithFamilyPolicies = true;
CrossMgAdmob.Current.UseRestrictedDataProcessing = true;

MgBannerAdView Properties

MgBannerAdView allows you to set the Ad Unit Id to specify the ads to load:

AdUnitId

(default: null): Set this to the Ad Unit Id from Google AdMob

Events

MgBannerAdView

AdClicked
AdClosed
AdImpression
AdOpened
AdFailedToLoad
AdLoaded

Interstitial Ads

InterstitialLoaded
InterstitialOpened
InterstitialClosed
InterstitialImpression
InterstitialFailedToShow
InterstitialFailedToLoad

Rewarded Video Ads

Rewarded
RewardedVideoAdClosed
RewardedVideoAdFailedToLoad
RewardedVideoAdFailedToShow
RewardedVideoAdLeftApplication
RewardedVideoAdLoaded
RewardedVideoAdOpened
RewardedVideoStarted
RewardedVideoAdCompleted
RewardedVideoAdImpression

Important Configuration

Code

Remember to include the MgAdmob library with this code (usually added automatically):

using Plugin.MgAdmob;

XAML

Add the following to any XAML file you wish to use MgAdmob in

xmlns:controls="clr-namespace:Plugin.MgAdmob.Controls;assembly=Plugin.MgAdmob"

Android

The Mobile Ads SDK must be initialised before use. This can be done by calling MobileAds.Initialize(ApplicationContext) in the OnCreate() method for your MainActivity class:

protected override void OnCreate(Bundle savedInstanceState)
{
   TabLayoutResource = Resource.Layout.Tabbar;
   ToolbarResource = Resource.Layout.Toolbar;

   base.OnCreate(savedInstanceState);            
	
   // Initialilse Mobile Ads
   MobileAds.Initialize(ApplicationContext);
	
   Xamarin.Forms.Forms.Init(this, savedInstanceState); 
   LoadApplication(new App());
}

Add the following to AndroidManifest.xml (between the <application></application> tags). Also remembering to replace ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy with your project id from Google Admob:

<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy" />
<activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:theme="@android:style/Theme.Translucent" />

Also, select the following permissions in the Android project properties:

ACCESS_NETWORK_STATE

INTERNET

Alternative, add the following entries directly to AndroidManifest.xml (typically after the <application></application> tags):

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />

If your Ads are not being displayed in the Android Emulator, make sure the Emulator was created with Google APIs selected, otherwise you'll find this message in your Debugger Console:

[GooglePlayServicesUtil] Google Play Store is missing.

iOS:

The Mobile Ads SDK must be initialised before use. This can be done by calling MobileAds.SharedInstance.Start() in the FinishedLaunching() method for your AppDelegate class:

public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
   // Initialilse Mobile Ads
   MobileAds.SharedInstance.Start(CompletionHandler);

   global::Xamarin.Forms.Forms.Init();
   LoadApplication(new App());

   return base.FinishedLaunching(app, options);
}

private void CompletionHandler(InitializationStatus status)
{
}

Edit your info.plist, and add the the following keys (remembering to replace ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy with your project id from Google Admob):

<key>GADApplicationIdentifier</key>
<string>ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy</string>
<key>GADIsAdManagerApp</key>
<true/>
<key>SKAdNetworkItems</key>
<array>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>cstr6suwn9.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>4fzdc2evr5.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>2fnua5tdw4.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>ydx93a7ass.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>5a6flpkh64.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>p78axxw29g.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>v72qych5uu.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>c6k4g5qg8m.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>s39g8k73mm.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>3qy4746246.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>3sh42y64q3.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>f38h382jlk.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>hs6bdukanm.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>prcb7njmu6.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>v4nxqhlyqp.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>wzmmz9fp6w.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>yclnxrl5pm.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>t38b2kh725.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>7ug5zh24hu.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>9rd848q2bz.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>n6fk4nfna4.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>kbd757ywx3.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>9t245vhmpl.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>4468km3ulz.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>2u9pt9hc89.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>8s468mfl3y.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>av6w8kgt66.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>klf5c3l5u5.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>ppxm28t8ap.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>424m5254lk.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>uw77j35x4d.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>578prtvx9j.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>4dzt52r2t5.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>e5fvkxwrpn.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>8c4e2ghe7u.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>zq492l623r.skadnetwork</string>
	</dict>
	<dict>
		<key>SKAdNetworkIdentifier</key>
		<string>3qcr597p9d.skadnetwork</string>
	</dict>
</array> 

To ustilise Google Admob on iOS, you must either build on a Mac machine or be paired to a Mac when building your project (i.e. Visual Studio on Windows)

mgadmob's People

Contributors

mg-code-solutions avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

brekooname

mgadmob's Issues

Xamarin android not working

Hello I wanted to use your plugin in my Xamarin android project(not Xamarin forms) it seems it doesn't work on the Xamarin android right?

Severity	Code	Description	Project	File	Line	Suppression State
Error		Unable to resolve interface type 'Google.Android.Material.Navigation.NavigationBarView/IOnItemSelectedListener'. Are you missing an assembly reference?	App2	D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\TabbedPageRenderer.cs	50	

iOS app crash during navigation to/from page with banner ads

Describe the bug
Hi! Thanks for the plugin. It helped me to solve some problems which I had with MTAdMobs plugin. But there is another issue which is critical for me.
When I'm navigating to (or from) a page with ListView with a banner ad inside - app crashes. Android works fine.

I'm using latest version of the plugin (0.0.2), Xamarin.Forms (5.0.0.2401), Xamarin.Google.iOS.MobileAds (8.13.0).

I would be grateful if you can solve this asap or tell me what am I doing wrong please.

Here is the full stack trace:

System.ObjectDisposedException: Cannot access a disposed object.
Object name: Google.MobileAds.BannerView.
at ObjCRuntime.ThrowHelper.ThrowObjectDisposedException (System.Object o) [0x00000] in /Users/builder/azdo/_work/2/s/xamarin-macios/src/ObjCRuntime/ThrowHelper.cs:40
at ObjCRuntime.NativeObjectExtensions.GetNonNullHandle (ObjCRuntime.INativeObject self, System.String argumentName) [0x0001b] in /Users/builder/azdo/_work/2/s/xamarin-macios/src/ObjCRuntime/INativeObject.cs:35
at UIKit.UIView.AddSubview (UIKit.UIView view) [0x00005] in /Users/builder/azdo/_work/2/s/xamarin-macios/src/build/ios/native/UIKit/UIView.g.cs:243
at Xamarin.Forms.Platform.iOS.ViewRenderer 2[TView,TNativeView].SetNativeControl (TNativeView uiview) [0x00047] in D:\a_work\1\s\Xamarin.Forms.Platform.iOS\ViewRenderer.cs:244
at Plugin.MgAdmob.Renderers.MgBannerAdViewRenderer.OnElementPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x0008d] in :0
at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x00000] in D:\a_work\1\s\Xamarin.Forms.Core\BindableObject.cs:266
at Xamarin.Forms.Element.OnPropertyChanged (System.String propertyName) [0x00000] in D:\a_work\1\s\Xamarin.Forms.Core\Element.cs:362
at Xamarin.Forms.BindableObject.ClearValue (Xamarin.Forms.BindableProperty property, System.Boolean fromStyle, System.Boolean checkAccess) [0x000f8] in D:\a_work\1\s\Xamarin.Forms.Core\BindableObject.cs:90
at Xamarin.Forms.BindableObject.ClearValue (Xamarin.Forms.BindableProperty property) [0x00000] in D:\a_work\1\s\Xamarin.Forms.Core\BindableObject.cs:38
at Xamarin.Forms.Platform.iOS.VisualElementRenderer 1[TElement].Dispose (System.Boolean disposing) [0x00077] in D:\a_work\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:396
at Xamarin.Forms.Platform.iOS.ViewRenderer 2[TView,TNativeView].Dispose (System.Boolean disposing) [0x0005c] in D:\a_work\1\s\Xamarin.Forms.Platform.iOS\ViewRenderer.cs:124
at Foundation.NSObject.Dispose () [0x00000] in /Users/builder/azdo/_work/2/s/xamarin-macios/src/Foundation/NSObject2.cs:218
at Xamarin.Forms.Platform.iOS.DisposeHelpers.DisposeModalAndChildRenderers (Xamarin.Forms.Element view) [0x000a0] in D:\a_work\1\s\Xamarin.Forms.Platform.iOS\DisposeHelpers.cs:41
at Xamarin.Forms.Platform.iOS.Platform.HandleChildRemoved (System.Object sender, Xamarin.Forms.ElementEventArgs e) [0x00006] in D:\a_work\1\s\Xamarin.Forms.Platform.iOS\Platform.cs:371
at Xamarin.Forms.Element.OnDescendantRemoved (Xamarin.Forms.Element child) [0x00000] in D:\a_work\1\s\Xamarin.Forms.Core\Element.cs:593
at Xamarin.Forms.Element.OnDescendantRemoved (Xamarin.Forms.Element child) [0x00018] in D:\a_work\1\s\Xamarin.Forms.Core\Element.cs:594
at Xamarin.Forms.Element.OnDescendantRemoved (Xamarin.Forms.Element child) [0x00018] in D:\a_work\1\s\Xamarin.Forms.Core\Element.cs:594
at Xamarin.Forms.Element.OnDescendantRemoved (Xamarin.Forms.Element child) [0x00018] in D:\a_work\1\s\Xamarin.Forms.Core\Element.cs:594
at Xamarin.Forms.Element.OnDescendantRemoved (Xamarin.Forms.Element child) [0x00018] in D:\a_work\1\s\Xamarin.Forms.Core\Element.cs:594
at Xamarin.Forms.Element.OnDescendantRemoved (Xamarin.Forms.Element child) [0x00018] in D:\a_work\1\s\Xamarin.Forms.Core\Element.cs:594
at Xamarin.Forms.Element.OnDescendantRemoved (Xamarin.Forms.Element child) [0x00018] in D:\a_work\1\s\Xamarin.Forms.Core\Element.cs:594
at Xamarin.Forms.Element.OnChildRemoved (Xamarin.Forms.Element child, System.Int32 oldLogicalIndex) [0x00027] in D:\a_work\1\s\Xamarin.Forms.Core\Element.cs:348
at Xamarin.Forms.VisualElement.OnChildRemoved (Xamarin.Forms.Element child, System.Int32 oldLogicalIndex) [0x00000] in D:\a_work\1\s\Xamarin.Forms.Core\VisualElement.cs:847
at Xamarin.Forms.ItemsView.RemoveLogicalChild (Xamarin.Forms.Element element) [0x00034] in D:\a_work\1\s\Xamarin.Forms.Core\Items\ItemsView.cs:119
at Xamarin.Forms.Platform.iOS.TemplatedCell.Bind (Xamarin.Forms.DataTemplate template, System.Object bindingContext, Xamarin.Forms.ItemsView itemsView) [0x00044] in D:\a_work\1\s\Xamarin.Forms.Platform.iOS\CollectionView\TemplatedCell.cs:108
at Xamarin.Forms.Platform.iOS.ItemsViewController 1[TItemsView].UpdateTemplatedCell (Xamarin.Forms.Platform.iOS.TemplatedCell cell, Foundation.NSIndexPath indexPath) [0x0007b] in D:\a_work\1\s\Xamarin.Forms.Platform.iOS\CollectionView\ItemsViewController.cs:287
at Xamarin.Forms.Platform.iOS.ItemsViewController 1[TItemsView].GetCell (UIKit.UICollectionView collectionView, Foundation.NSIndexPath indexPath) [0x00033] in D:\a_work\1\s\Xamarin.Forms.Platform.iOS\CollectionView\ItemsViewController.cs:94
at (wrapper managed-to-native) ObjCRuntime.Messaging.void_objc_msgSend_IntPtr(intptr,intptr,intptr)
at UIKit.UICollectionView.InsertItems (Foundation.NSIndexPath[] indexPaths) [0x00021] in /Users/builder/azdo/_work/2/s/xamarin-macios/src/build/ios/native/UIKit/UICollectionView.g.cs:463
at Xamarin.Forms.Platform.iOS.ObservableItemsSource+<>c__DisplayClass36_0.b__0 () [0x00000] in D:\a_work\1\s\Xamarin.Forms.Platform.iOS\CollectionView\ObservableItemsSource.cs:166
at Xamarin.Forms.Platform.iOS.ObservableItemsSource.Update (System.Action update, System.Collections.Specialized.NotifyCollectionChangedEventArgs args) [0x00015] in D:\a_work\1\s\Xamarin.Forms.Platform.iOS\CollectionView\ObservableItemsSource.cs:278
at Xamarin.Forms.Platform.iOS.ObservableItemsSource.Add (System.Collections.Specialized.NotifyCollectionChangedEventArgs args) [0x0005a] in D:\a_work\1\s\Xamarin.Forms.Platform.iOS\CollectionView\ObservableItemsSource.cs:166
at Xamarin.Forms.Platform.iOS.ObservableItemsSource.CollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs args) [0x00047] in D:\a_work\1\s\Xamarin.Forms.Platform.iOS\CollectionView\ObservableItemsSource.cs:121
at Xamarin.Forms.Platform.iOS.ObservableItemsSource.CollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs args) [0x0002d] in D:\a_work\1\s\Xamarin.Forms.Platform.iOS\CollectionView\ObservableItemsSource.cs:108
at System.Collections.ObjectModel.ObservableCollection 1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00018] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corefx/src/System.ObjectModel/src/System/Collections/ObjectModel/ObservableCollection.cs:263
at System.Collections.ObjectModel.ObservableCollection 1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedAction action, System.Object item, System.Int32 index) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corefx/src/System.ObjectModel/src/System/Collections/ObjectModel/ObservableCollection.cs:338
at System.Collections.ObjectModel.ObservableCollection 1[T].InsertItem (System.Int32 index, T item) [0x0001a] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corefx/src/System.ObjectModel/src/System/Collections/ObjectModel/ObservableCollection.cs:196
at System.Collections.ObjectModel.Collection 1[T].Insert (System.Int32 index, T item) [0x00027] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corefx/src/Common/src/CoreLib/System/Collections/ObjectModel/Collection.cs:116
at Pancakes.PageModels.EventsListPageModel.InsertAds () [0x00038] in /Users/administrator/source/Pancakes-Xamarin-Forms/Pancakes/Pancakes/PageModels/EventsListPageModel.cs:71
at Pancakes.PageModels.EventsListPageModel.Init (System.Object initData) [0x001b0] in /Users/administrator/source/Pancakes-Xamarin-Forms/Pancakes/Pancakes/PageModels/EventsListPageModel.cs:50
at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__7_0 (System.Object state) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1021
at Foundation.NSAsyncSynchronizationContextDispatcher.Apply () [0x00000] in /Users/builder/azdo/_work/2/s/xamarin-macios/src/Foundation/NSAction.cs:178
--- End of stack trace from previous location where exception was thrown ---
at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00013] in /Users/builder/azdo/_work/2/s/xamarin-macios/src/UIKit/UIApplication.cs:75
at Pancakes.iOS.Application.Main (System.String[] args) [0x00001] in /Users/administrator/source/Pancakes-Xamarin-Forms/Pancakes/Pancakes.iOS/Main.cs:12

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.