This extension provides a unified and simple to use interface to use IronSource ad mediation on iOS and Android.
To use IronSource in your Defold project, add a version of the IronSource extension to your game.project
dependencies from the list of available Releases. Find the version you want, copy the URL to ZIP archive of the release and add it to the project dependencies.
Select Project->Fetch Libraries
once you have added the version to game.project
to download the version and make it available in your project.
Copy/paste [iron_source]
section from game.project file into your game.project
.
If you don’t need an adapter, just set 0
into an adapter’s field (these fields are boolean and may be 1
or 0
.).
The admob_android_appid
field should contain app_id
if you want to use AdMob adapter specify admob_android as 1. The same for admob_ios
and admob_ios_appid
.
Use the official Android and iOS manuals for SDK integration, including everything related to the SDK functions: initialization, AD loading and showing, meta data, consent, work with user id and the other functions. Also for Adapters integration. Ignore everything related to Gradle, library installation, changes in manifests, and so on.
In Defold the SDK has ironsource
namespace and all the methods are the same as in official documentation but in camel case. For example if in official documentation you see IronSource.setMetaData("AppLovin_AgeRestrictedUser","true");
in Defold it will be: ironsource.set_meta_data("AppLovin_AgeRestrictedUser","true")
.
The SDK has just one universal callback for everything. Please check callback.lua for better understanding.
See the example folder to understand how to use the extension. Especially ui.gui_script and callback.lua files.
If you get such an error, make sure that you initialize ADS right and use test placements. If it still doesn’t work ask IronSource support.
The source code is available on GitHub
Did you spot an error or do you have a suggestion? Please let us know on GitHub!
GITHUB