appodeal.getVersion()

Type Function
Return value none
Revision Release 2024.3703
Keywords ads, advertising, Appodeal, getVersion
See also appodeal.*

Overview

Function returns plugin version. The data returned is formatted as a pluginVersion - current Corona Appodeal plugin version and sdkVersion - current Appodeal SDK version in event.data.

Syntax

appodeal.getVersion()

Example

local appodeal = require( "plugin.appodeal" )

local function adListener( event )

    if ( event.phase == "init" ) then  
    -- Successful initialization

  elseif ( event.phase == "failed" ) then  -- The ad failed to load
        print( event.type )
        print( event.isError )
        print( event.response )

  elseif ( event.phase == "dataReceived" ) then  -- Event data received
        print( event.type )
        print( event.data )
    end
end

-- Initialize the Appodeal plugin
appodeal.init( adListener, { appKey="YOUR_APP_KEY" } )

-- Sometime later, after Appodeal will be fully initialized get plugin and SDK versions
appodeal.getVersion()