Saltearse al contenido

Integration

Esta página aún no está disponible en tu idioma.

This section shows you how to download, configure, and initialize the AppLovin MAX Defold Plugin.

Download the Latest Plugin

To download and import the AppLovin MAX Defold Plugin into your project, follow these steps:

  1. Find the latest version of the plugin from the list of available Releases.
  2. Copy the URL to the ZIP archive of the release. Add it to your game.project dependencies.
    [project]
    dependencies#0 = https://url.to.latest.version/release.zip
  3. Select Project > Fetch Libraries to download the plugin and make it available in your project.
  4. Add /extension-applovin/res/ios to your game.project bundle resources.
    [project]
    bundle_resources = /extension-applovin/res/ios
    dependencies#0 = https://url.to.latest.version/release.zip

Initialize the SDK

Declare and set a callback function to receive SDK events from the SDK. Then initialize the SDK as soon as your app launches, as in the code sample below.

Ad assets that are fully cached result in a better user experience. For this reason, always initialize the AppLovin SDK on startup. This gives mediated networks the maximum amount of time to cache ads. This is especially important with video ads.

local function applovin_callback(self, name, params)
if name == "OnSdkInitializedEvent" then
-- AppLovin SDK is initialized, start loading ads
end
function init(self)
applovin.set_callback(applovin_callback)
applovin.initialize("«your-SDK-key»")
end

You can find your SDK key in the Account > General > Keys section of the AppLovin dashboard.

iOS 14 Support

In iOS 14, Apple introduced global privacy policy changes. Apple requires applications to comply with these new policies. If you fail to comply, you may lose revenue. This section explains how to comply.

SKAdNetwork

Update your app’s Info.plist with network-specific identifiers. See the SKAdNetwork documentation for instructions.

You must obtain consent from your users in certain jurisdictions on behalf of AppLovin’s monetization partners. You must also correctly pass consent values to AppLovin. To learn how to do these things, review the Privacy–Consent, Age-Related Flags, and Data APIs documentation.

iOS 15 Global SKAdNetwork Reporting

Starting with iOS 15, Apple allows developers to send a copy of their SKAdNetwork install postbacks to an endpoint of their choice. MAX includes a Global SKAdNetwork Report (MAX > Mediation > Analyze > Global SKA Report). You can use this to access the SKAdNetwork data across all of your network partners in one place.

To leverage the MAX Global SKAdNetwork Report, enable iOS 15 SKAdNetwork reporting. Do this in the app’s iOS Info.plist:

  1. In AppLovinMAX_UPL_IOS.xml, create a new key named NSAdvertisingAttributionReportEndpoint of type string.
  2. Give that key the value https://postbacks-app.com.

The final result should look something like this:

<iosPListUpdates>
<addElements tag="dict" once="true">
<key>NSAdvertisingAttributionReportEndpoint</key>
<string>https://postbacks-app.com</string>
</addElements>
</iosPListUpdates>