applovin.*

Type Library
Revision Release 2021.3646
Keywords ads, advertising, AppLovin
Platforms Android, iOS

Overview

The AppLovin plugin allows developers to monetize users through AppLovin static interstitial, video interstitial, and rewarded video ads.

Notes
  • Once you are registered, obtain your SDK key from the AppLovin developer portal. From the Account section, expand the Account menu on the left side, select Keys, and your SDK key should be revealed.

  • Native ads are not supported at this time.

  • Apps are automatically added to the AppLovin developer portal when you include this plugin within your project, require() it, and call applovin.init().

  • If you use the plugin and make changes to the ad settings in the AppLovin developer portal, you must also email support@solar2d.com with a summary of your changes. This ensures that your ads and associated preferences will be delivered consistently.

Important

Check out new setHasUserConsent method to enable GDPR data collection restrictions.

Registration

To begin, please register with AppLovin. Once you have access to the AppLovin developer portal, you can view your apps, select ad preferences, and more.

Syntax

AppLovin
local applovin = require( "plugin.applovin" )

Functions

Events

Project Settings

To use this plugin, add an entry into the plugins table of build.settings. When added, the build server will integrate the plugin during the build phase.

AppLovin
settings =
{
    iphone =
    {
        plist =
        {
            NSUserTrackingUsageDescription = "This only uses device info for less annoying, more relevant ads.",
            SKAdNetworkItems = {
                { SKAdNetworkIdentifier = "24t9a8vw3c.skadnetwork" },
                    { SKAdNetworkIdentifier = "275upjj5gd.skadnetwork" },
                    { SKAdNetworkIdentifier = "294l99pt4k.skadnetwork" },
                    { SKAdNetworkIdentifier = "2fnua5tdw4.skadnetwork" },
                    { SKAdNetworkIdentifier = "2u9pt9hc89.skadnetwork" },
                    { SKAdNetworkIdentifier = "32z4fx6l9h.skadnetwork" },
                    { SKAdNetworkIdentifier = "3qcr597p9d.skadnetwork" },
                    { SKAdNetworkIdentifier = "3rd42ekr43.skadnetwork" },
                    { SKAdNetworkIdentifier = "3sh42y64q3.skadnetwork" },
                    { SKAdNetworkIdentifier = "424m5254lk.skadnetwork" },
                    { SKAdNetworkIdentifier = "4468km3ulz.skadnetwork" },
                    { SKAdNetworkIdentifier = "4fzdc2evr5.skadnetwork" },
                    { SKAdNetworkIdentifier = "4pfyvq9l8r.skadnetwork" },
                    { SKAdNetworkIdentifier = "523jb4fst2.skadnetwork" },
                    { SKAdNetworkIdentifier = "54nzkqm89y.skadnetwork" },
                    { SKAdNetworkIdentifier = "578prtvx9j.skadnetwork" },
                    { SKAdNetworkIdentifier = "5a6flpkh64.skadnetwork" },
                    { SKAdNetworkIdentifier = "5l3tpt7t6e.skadnetwork" },
                    { SKAdNetworkIdentifier = "5lm9lj6jb7.skadnetwork" },
                    { SKAdNetworkIdentifier = "6xzpu9s2p8.skadnetwork" },
                    { SKAdNetworkIdentifier = "79pbpufp6p.skadnetwork" },
                    { SKAdNetworkIdentifier = "7rz58n8ntl.skadnetwork" },
                    { SKAdNetworkIdentifier = "7ug5zh24hu.skadnetwork" },
                    { SKAdNetworkIdentifier = "8s468mfl3y.skadnetwork" },
                    { SKAdNetworkIdentifier = "9b89h5y424.skadnetwork" },
                    { SKAdNetworkIdentifier = "9nlqeag3gk.skadnetwork" },
                    { SKAdNetworkIdentifier = "9rd848q2bz.skadnetwork" },
                    { SKAdNetworkIdentifier = "9t245vhmpl.skadnetwork" },
                    { SKAdNetworkIdentifier = "av6w8kgt66.skadnetwork" },
                    { SKAdNetworkIdentifier = "c6k4g5qg8m.skadnetwork" },
                    { SKAdNetworkIdentifier = "cg4yq2srnc.skadnetwork" },
                    { SKAdNetworkIdentifier = "cj5566h2ga.skadnetwork" },
                    { SKAdNetworkIdentifier = "cstr6suwn9.skadnetwork" },
                    { SKAdNetworkIdentifier = "e5fvkxwrpn.skadnetwork" },
                    { SKAdNetworkIdentifier = "ejvt5qm6ak.skadnetwork" },
                    { SKAdNetworkIdentifier = "f38h382jlk.skadnetwork" },
                    { SKAdNetworkIdentifier = "feyaarzu9v.skadnetwork" },
                    { SKAdNetworkIdentifier = "g28c52eehv.skadnetwork" },
                    { SKAdNetworkIdentifier = "ggvn48r87g.skadnetwork" },
                    { SKAdNetworkIdentifier = "glqzh8vgby.skadnetwork" },
                    { SKAdNetworkIdentifier = "gta9lk7p23.skadnetwork" },
                    { SKAdNetworkIdentifier = "hs6bdukanm.skadnetwork" },
                    { SKAdNetworkIdentifier = "k674qkevps.skadnetwork" },
                    { SKAdNetworkIdentifier = "kbd757ywx3.skadnetwork" },
                    { SKAdNetworkIdentifier = "kbmxgpxpgc.skadnetwork" },
                    { SKAdNetworkIdentifier = "klf5c3l5u5.skadnetwork" },
                    { SKAdNetworkIdentifier = "ludvb6z3bs.skadnetwork" },
                    { SKAdNetworkIdentifier = "m8dbw4sv7c.skadnetwork" },
                    { SKAdNetworkIdentifier = "mlmmfzh3r3.skadnetwork" },
                    { SKAdNetworkIdentifier = "mtkv5xtk9e.skadnetwork" },
                    { SKAdNetworkIdentifier = "n6fk4nfna4.skadnetwork" },
                    { SKAdNetworkIdentifier = "n9x2a789qt.skadnetwork" },
                    { SKAdNetworkIdentifier = "p78axxw29g.skadnetwork" },
                    { SKAdNetworkIdentifier = "ppxm28t8ap.skadnetwork" },
                    { SKAdNetworkIdentifier = "prcb7njmu6.skadnetwork" },
                    { SKAdNetworkIdentifier = "pwa73g5rt2.skadnetwork" },
                    { SKAdNetworkIdentifier = "qqp299437r.skadnetwork" },
                    { SKAdNetworkIdentifier = "r45fhb6rf7.skadnetwork" },
                    { SKAdNetworkIdentifier = "rvh3l7un93.skadnetwork" },
                    { SKAdNetworkIdentifier = "t38b2kh725.skadnetwork" },
                    { SKAdNetworkIdentifier = "tl55sbb4fm.skadnetwork" },
                    { SKAdNetworkIdentifier = "uw77j35x4d.skadnetwork" },
                    { SKAdNetworkIdentifier = "v72qych5uu.skadnetwork" },
                    { SKAdNetworkIdentifier = "wg4vff78zm.skadnetwork" },
                    { SKAdNetworkIdentifier = "wzmmz9fp6w.skadnetwork" },
                    { SKAdNetworkIdentifier = "x8jxxk4ff5.skadnetwork" },
                    { SKAdNetworkIdentifier = "xy9t38ct57.skadnetwork" },
                    { SKAdNetworkIdentifier = "yclnxrl5pm.skadnetwork" },
                    { SKAdNetworkIdentifier = "ydx93a7ass.skadnetwork" },
                    { SKAdNetworkIdentifier = "zmvfpc5aq8.skadnetwork" },
            }
        },
    },
    plugins =
    {
        ["plugin.applovin"] =
        {
            publisherId = "com.coronalabs"
        },
    },
}
Note

For Android, the following permissions/features are automatically added when using this plugin:

  • "android.permission.INTERNET"
  • "android.permission.ACCESS_NETWORK_STATE"
  • "android.permission.WRITE_EXTERNAL_STORAGE"

Sample project