Google Admob for Xojo

For next MBS Xojo Plugins we add classes for Google Admob service, so you can earn money in your iOS applications. By using our classes, you can enter your application ID (to info.plist file) and the ad unit IDs to the various ads you like to show:

  • Banner views via GADBannerViewMBS class.
  • Full screen ad when application opens via GADAppOpenAdMBS class.
  • Full screen ad when you transition from one part of the app to another, e.g. to a new level in a game. Transitional ad via GADInterstitialAdMBSclass.

The plugin already includes the basic classes to do various ads in your iOS Xojo app. The test project includes sample ad unit IDs, so you see test ads. The two screenshots on the right show our text app with a banner ad and a fullscreen screenshot with an interstitial ad. We may add more if needed, so please try and let us know.

Please notice that if you ask your clients for $1 in-app purchase to remove ads, you may make more money from that customer than with ads. But ads are great for a free application with thousands of users of course.

3 Likes

thanks a lot !
not for desktop ?

The SDK looks to be for iOS since it is about mobile ads.

1 Like

What a great news @Christian_Schmitz you remove the the last obstacle that will allow you to take the plunge to use Xojo for mobile apps :clap:

2 Likes

Next step a Plugin to use all other Google Firebase services : auth, database, analytics, file storage …

2 Likes

@Christian_Schmitz The code in the StartButton’s Pressed event (in your example project) starts a “sharedInstance”. Do you know if it’s enough to call this code once when opening the app or do I have to call this for every MobileScreen in my app?

You only create one GADMobileAds object for the app like in our example.

This object then is the blessed one, which can be accessed anywhere via GADMobileAdsMBS.sharedInstance property.

2 Likes

Thanks for the quick reply (on a Sunday)!

I have some time to spend in an airport lounge…

Just writing a blog article to kill the time.

2 Likes

We add a few more classes: GADAdNetworkResponseInfoMBS, GADAdRewardMBS, GADResponseInfoMBS, GADRewardedAdMBS, GADAdValueMBS and GADRewardedInterstitialAdMBS classes.

2 Likes

What do you know about admob exprecation ?

Well, I will probably have to update the plugins every year to move to new SDK version.

Your link is for the Android SDK!

iOS is here and version 9 seems to be correct:

No wonder we got a recent one as I downloaded a fresh copy a few days ago.

1 Like

Thanks @Christian_Schmitz for this plugin

Today, two of my IOS applications have been accepted.

Easy to set up for the XOJO part, but a bit tricky with the Apple part.
Don’t forget to configure the privacy of your application.

2 Likes

Thibault, would be nice if you can share the name of your apps, or put them in Xojo showcase. Motivates the rest of us here. :grin:

1 Like

You can find them:

and

1 Like

How did you get your app approved with ads without asking permission for tracking?

And unfortunately your app looks bad in dark mode.

thanks @Jeremie_L for the dark mode correction. Fixed in the waiting update.

For the approuvement by apple:

In the info.plist provided by @Christian_Schmitz , you have :

<key>NSUserTrackingUsageDescription</key>
<string>This identifier will be used to deliver personalized ads to you.</string>

Remove it

After, you have to configure your app confidentiality

Data collection :
Location : coarse location
Identifier : device id
Usage data : Product interaction / Advertising data
Diagnostic : crash data / performance data

After that, you have to set up :

Course Location:

  1. Data use: Third-Party Advertising, Analytics
  2. Linked to user: Yes
  3. Tracking: Yes

Device Id:

  1. Data use: Third-Party Advertising, Analytics
  2. Linked to user: Yes
  3. Tracking: Yes

Product Interaction:

  1. Data use: Third-Party Advertising, Analytics
  2. Linked to user: Yes
  3. Tracking: Yes

Advertising Data:

  1. Data use: Third-Party Advertising, Analytics
  2. Linked to user: Yes
  3. Tracking: Yes

Crash Data:

  1. Data use: Third-Party Advertising, Analytics
  2. Linked to user: No
  3. Tracking: Yes

Performance Data:

  1. Data use: Third-Party Advertising, Analytics
  2. Linked to user: Yes
  3. Tracking: Yes

My two apps were approved with this method.

Ok, now I get it. I didn’t know that was possible.

However, it is a bad idea to do this as it completely removes the possibility of showing personalized ads to this user. Personalized ads should have a higher eCPM.

I know, but it’s the next step for me :wink:

For information, the permissions listed in my previous message work with the request of tracking too :wink: