Using iAd In-Game Ads on iOS

Using the iAd in-game advertisement system on iOS.

Windows
MacOS
Linux

Since Apple has deprecated iAds you will now need to select a different ad provider like Google AdMob, Chartboost or Facebook Ads to display add's in your iOS games.

iAd.png

Configuration

All configuration for the iAd system is handled through the Apple ecosystem. See Configuring Store Technologies for more information.

C++ Projects

If you project is a C++ project you will also need to add the appropriate modules to your Target.cs file, for example:

...
        if (Target.Platform == UnrealTargetPlatform.IOS)
        {
        ModuleNames.Add("OnlineSubsystemFacebook");
        ModuleNames.Add("OnlineSubsystemIOS");
        ModuleNames.Add("IOSAdvertising");
        ModuleNames.Add("MetalRHI");
        }

Look at the Unreal Match 3 Target.cs file, Match3\Source\Match3.Target.cs, to see how this fits into the entire file.

Showing the Ad Banner

The Show Ad Banner function is used to display an ad banner in your game. Call it somewhere in the logic where you want to show an ad, such as when the main menu is shown.

In Blueprints:

The example below is from the Unreal Match 3 sample game, which displays an ad banner when the victory/defeat screen is shown using the Construct event of that Widget Blueprint:

show_ad.png

See the Show Ad Banner reference for more information on the node.

Hiding the Ad Banner

The Hide Ad Banner functions hides the visible ad banner. Call it when you no longer want the ad to be displayed, such as when you exit the main menu.

In Blueprints:

The example below is from the Unreal Match 3 sample game, which hides the ad banner when the victory/defeat screen is exited using the Destruct event of that Widget Blueprint:

hide_ad.png

See the Hide Ad Banner reference for more information on the node.

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback