Easily Add Advertising To Your Apps With Delphi XE6 Firemonkey On Android And IOS

Delphi XE6 Firemonkey Iad AdMob BannerAd ExampleMarco Cantu from Embarcadero has a blog post up where he shows how simple it is to use the new TBannerAd component for Delphi XE6 Firemonkey. TBannerAd wraps the AdMob API for Android and the Iad API for IOS so it is cross platform which means you can use one component and it works on both platforms. It may actually be harder to setup the account information that you need to be able to use AdMob and IOS than it is to actually implement the ads within your app. Using the component is as simple as setting the AdUnitID property and calling the LoadAd method. It also appears that TBannerAd has a TestMode property which corresponds to the TestMode option in the Android SDK. There is more information about the TBannerAd functionality over in the XE6 documentation called Adding Advertising To Your Mobile Apps. Keep in mind that TBannerAd looks like it really only implements a standard banner and doesn’t support interstitials that I can see. Interstitials are where the money is at in my experience so you will need to get a third party library to implement that in your app. The last thing you need to get the banner ads running on Android is to add a com.google.ads.AdActivity section to your Android manifest. It should look like this:

And finally a tip from the Embarcadero Firemonkey forum concerning an error you may receive from TBannerAd on IOS. If you get this error: “ObjectiveC-class ADBannerView not found” then “You have to add “-framework iAd” to the LD Linker commands in the project-options.” according to Oliver S.

Update: Marco has another blog post here where he talks about the Linker issue. He recommends adding iAd and StoreKit like this “-framework iAd -framework StoreKit”.

Head over and read the full blog post from Marco Cantu where he demonstrates TBannerAd In Delphi XE6.

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Easily Add Advertising To Your Apps With Delphi XE6 Firemonkey On Android And IOS by Delphi XE5 XE6 XE7 XE8 10 Seattle Berlin Firemonkey, Delphi Android, Delphi IOS is licensed under a Creative Commons Attribution 4.0 International License.

Leave a Reply

Show Buttons
Hide Buttons
Read previous post:
Delphi XE5 XE6 Firemonkey Custom Style Frames
Edit And Store Custom Styles Within A TFrame In Delphi XE5 & XE6 Firemonkey On Android And IOS

A developer over on the Embarcadero forum has a tip about using a TFrame object to hold your custom styles...

Close