Type Function Return value none Revision Release 2024.3703 Keywords ads, advertising, Supersonic, init See also supersonic.load() supersonic.show() supersonic.*
supersonic.init()
initializes the Supersonic plugin.
Once initialized, you can load an ad using supersonic.load() and subsequently show it via supersonic.show().
supersonic.init( adListener, params )
Listener. Listener function that will receive adsRequest events.
Table. Table containing Supersonic initialization values — see the next section for details.
The params
table includes initialization properties for the Supersonic plugin.
String. Your Supersonic app key, retrieved from the Supersonic developer portal.
Boolean. If set to false
, Chartboost will enable GDPR data collection restrictions, set to true
for opposite. Default is false
.
local supersonic = require( "plugin.supersonic" ) local function adListener( event ) if ( event.phase == "init" ) then -- Successful initialization print( event.isError ) end end -- Initialize the Supersonic plugin supersonic.init( adListener, { appKey="YOUR_APP_KEY" } )