Type Library Revision Release 2022.3683 Keywords ads, advertising, AdColony Platforms Android, iOS
The AdColony plugin allows developers to monetize users through AdColony video interstitial and rewarded video ads.
The AdColony plugin is only available to users who have purchased the Corona Professional Bundle or the AdColony plugin. This plugin lets you keep 100% of your ad revenue and allows you to manage your account/settings with AdColony directly.
Check out new hasUserConsent
init parameter to enable GDPR data collection restrictions.
Before you can use this plugin, you must register with AdColony.
local adcolony = require( "plugin.adcolony" )
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.
settings = { plugins = { ["plugin.adcolony"] = { publisherId = "com.coronalabs" }, }, }
If your app is for iOS, you must also include the following code in build.settings
to ensure that AdColony functions as intended:
settings = { iphone = { plist = { LSApplicationQueriesSchemes = { "fb", "instagram", "tumblr", "twitter" }, NSCalendarsUsageDescription = "This app would like to add events to the calendar.", NSPhotoLibraryUsageDescription = "This app would like to access the photo library.", NSCameraUsageDescription = "This app would like to access the camera.", NSMotionUsageDescription = "This app would like to use interactive ad controls.", NSUserTrackingUsageDescription = "To serve more releavant ads", SKAdNetworkItems = { { SKAdNetworkIdentifier = "4PFYVQ9L8R.skadnetwork" }, { SKAdNetworkIdentifier = "YCLNXRL5PM.skadnetwork" }, { SKAdNetworkIdentifier = "V72QYCH5UU.skadnetwork" }, { SKAdNetworkIdentifier = "TL55SBB4FM.skadnetwork" }, { SKAdNetworkIdentifier = "T38B2KH725.skadnetwork" }, { SKAdNetworkIdentifier = "PRCB7NJMU6.skadnetwork" }, { SKAdNetworkIdentifier = "PPXM28T8AP.skadnetwork" }, { SKAdNetworkIdentifier = "MLMMFZH3R3.skadnetwork" }, { SKAdNetworkIdentifier = "KLF5C3L5U5.skadnetwork" }, { SKAdNetworkIdentifier = "HS6BDUKANM.skadnetwork" }, { SKAdNetworkIdentifier = "C6K4G5QG8M.skadnetwork" }, { SKAdNetworkIdentifier = "9T245VHMPL.skadnetwork" }, { SKAdNetworkIdentifier = "9RD848Q2BZ.skadnetwork" }, { SKAdNetworkIdentifier = "8S468MFL3Y.skadnetwork" }, { SKAdNetworkIdentifier = "7UG5ZH24HU.skadnetwork" }, { SKAdNetworkIdentifier = "4FZDC2EVR5.skadnetwork" }, { SKAdNetworkIdentifier = "4468KM3ULZ.skadnetwork" }, { SKAdNetworkIdentifier = "3RD42EKR43.skadnetwork" }, { SKAdNetworkIdentifier = "2U9PT9HC89.skadnetwork" }, { SKAdNetworkIdentifier = "M8DBW4SV7C.skadnetwork" }, { SKAdNetworkIdentifier = "7RZ58N8NTL.skadnetwork" }, { SKAdNetworkIdentifier = "EJVT5QM6AK.skadnetwork" }, { SKAdNetworkIdentifier = "5LM9LJ6JB7.skadnetwork" }, { SKAdNetworkIdentifier = "44JX6755AQ.skadnetwork" }, { SKAdNetworkIdentifier = "MTKV5XTK9E.skadnetwork" }, } } } }
Important
If building for iOS, you must bypass App Transport Security (ATS) by adding the following to the plist
table of build.settings
. While we do not blindly encourage this approach for all developers and projects, bypassing ATS is required in certain cases. For more information on ATS, please see the Managing App Transport Security guide.
settings = { iphone = { plist = { NSAppTransportSecurity = { NSAllowsArbitraryLoads=true }, }, }, }
For Android, you should remove any legacy inclusion of the ["plugin.google.play.services"]
plugin from your build.settings
.
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"
In addition, you can add the following optional permissions:
"android.permission.VIBRATE"