Get access to over 100 FireMonkey cross platform samples for Android, IOS, OSX, Windows, and Linux!

AndroidCode SnippetComponentDelphiDemoFiremonkeyIOS

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.

Related posts
AndroidC++BuilderDelphiDemoFiremonkeyWindows

Powerful Commercial Gorilla3D Framework Upgraded For Delphi FireMonkey On Windows And Android

AndroidC++BuilderCode SnippetDelphiDemoFiremonkeyIOSOSXShowcaseWindows

Powerful Cross Platform Email App Sample In Delphi 10.4.1 FireMonkey For Android And IOS

AndroidC++BuilderDelphiFiremonkeyIOSOSXWindows

Significant Update Available For Delphi FireMonkey 10.4.1 On Android, IOS, OSX, Windows, And Linux

C++BuilderDelphiIDEWindows

Professional SVG Icon Image List For Delphi 10.4 FireMonkey On Windows

Sign up for our Newsletter and
stay informed

Leave a Reply