Type Library Revision Release 2024.3703 Keywords ads, advertising, TrialPay Platforms Android, iOS
The TrialPay plugin allows developers to monetize their mobile app with TrialPay static interstitials, video interstitials, rewarded videos, and offer walls.
Before you can use this plugin, you must register with TrialPay.
local trialPay = require( "plugin.trialPay" )
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.trialPay"] = { publisherId = "com.coronalabs" }, }, }
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 }, }, }, }
On devices running Android 6.0 and higher, this plugin requires the STORAGE
permission group for caching of video ads. For details on requesting permissions at runtime, please see here.
For Android, the following permissions/features are automatically added when using this plugin:
"android.permission.INTERNET"
"android.permission.ACCESS_NETWORK_STATE"
"android.permission.READ_PHONE_STATE"
"android.permission.WRITE_EXTERNAL_STORAGE"
"android.permission.ACCESS_WIFI_STATE"