To show a rewarded ad, call showAd() on the MARewardedAd object that you created above.
To load an ad create a MAAdView object with your ad unit and call loadAd().
To show the ad, add the MAAdView object as a subview of your view hierarchy.
Implement MAAdViewAdDelegate so you can be notified of when your ad is ready and other ad events.
To hide a banner or MREC, call the following:
To show a banner or MREC, call the following:
Select the ad networks to integrate. Then follow the specific instructions below.
[COMPONENT: NetworkConfigurator]
[COMPONENT: ConfiguratorSection]
[COMPONENT: ConfiguratorSection]
[COMPONENT: ConfiguratorSection]
[COMPONENT: ConfiguratorSection]
[COMPONENT: ConfiguratorSection]
[COMPONENT: ConfiguratorSection]
[COMPONENT: ConfiguratorSection]
[COMPONENT: ConfiguratorSection]
[COMPONENT: ConfiguratorSection]
[COMPONENT: ConfiguratorSection]
[COMPONENT: ConfiguratorSection]
[COMPONENT: ConfiguratorSection]
[COMPONENT: ConfiguratorSection]
[COMPONENT: ManualDownloadsTable]
To receive release updates, subscribe to the AppLovin-MAX-SDK-iOS GitHub repository.
[COMPONENT: DownloadButton]
The downloaded zip file contains the AppLovinSDK.xcframework file.
To add the SDK to your application, drag the AppLovinSDK.xcframework file to your Xcode project.
Include AppLovinSDK.xcframework in the Frameworks, Libraries, and Embedded Content section of your Xcode project target’s settings.
You must add the -ObjC flag in order for you to compile the AppLovin SDK.
To enable the -ObjC flag, select File > Project Settings, go to Build Settings, search for Other Linker Flags, then click + to add -ObjC.
Link the following frameworks in your project:
To enable the MAX Ad Review service, download
[COMPONENT: AdReviewLink]
and move it into your project folder.
Open a terminal window, cd to your project directory and run:
Select File > Project Settings > Info.
Click one of the rows of Custom iOS Properties and click + to add a new row.
Set the key of the new row to AppLovinSdkKey and the value to your SDK key.
You can find your SDK key in the Account > General > Keys section of the AppLovin dashboard.
Before you initialize the SDK, create an initialization configuration object for the SDK in your app delegate’s application:applicationDidFinishLaunching: method.
This configuration object allows you to configure the properties that the SDK will initialize with.
These initialization properties are immutable, except ALSdkSettings which contains mutable properties that can change during the lifetime of the app.
You can find your SDK key in the Account > General > Keys section of the AppLovin dashboard.
Initialize the AppLovin SDK with the initialization configuration object. Do this at startup. This maximizes the time the SDK can take to cache mediated network ads, which results in a better user experience.
Below is a sample integration:
Refer to the SKAdNetwork documentation for integration instructions.
To load an interstitial ad, instantiate an MAInterstitialAd object with your ad unit and call loadAd().
Implement MAAdDelegate so you can be notified of when your ad is ready and other ad events.
To show an interstitial ad, call showAd() on the MAInterstitialAd object that you created above.
To load a rewarded ad, retrieve a MARewardedAd object with your rewarded ad unit and call loadAd() on it.
Implement MARewardedAdDelegate so you can be notified of when your ad is ready and other ad events.