DISCLAIMER
To be honest I have no idea what I’m doing here (as well, as in the Tenjin Extension ) - I’m not either a C++ programmer or Objective-C programmer, don’t know how native iOS apps work and the whole extension for 80% was copy-pasted from Unity Ads Extension. It seems working and enough for my needs, but if you want to use it - use it at your own risk.
IronSource is a well known monetization/mediation ad network. In current implementation only Interstitial and Rewarded Ads are supported, Banners are not. Also, I’m going to add other networks for mediation, but going to keep master branch with clear IS implementation.
if ironsource then
ironsource.init("your_app_key", true)
ironsource.set_callback(ironsource_callback)
ironsource.validate_integration()
ironsource.load_interstitial()
end
if ironsource and ironsource.is_interstitial_ready() then
ironsource.show_interstitial()
end
if ironsource and ironsource.is_rewarded_ready() then
ironsource.show_rewarded()
end
function ironsource_callback(self, message_type, message)
if message_type == ironsource.INTERSTITIAL_DID_LOAD then
print("ironsource_callback: INTERSTITIAL_DID_LOAD")
elseif message_type == ironsource.INTERSTITIAL_DID_SHOW then
print("ironsource_callback: INTERSTITIAL_DID_SHOW")
elseif message_type == ironsource.INTERSTITIAL_DID_CLICK then
print("ironsource_callback: INTERSTITIAL_DID_CLICK")
elseif message_type == ironsource.INTERSTITIAL_DID_CLOSE then
print("ironsource_callback: INTERSTITIAL_DID_CLOSE")
ironsource.load_interstitial()
elseif message_type == ironsource.INTERSTITIAL_DID_OPEN then
print("ironsource_callback: INTERSTITIAL_DID_OPEN")
elseif message_type == ironsource.INTERSTITIAL_DID_FAIL_TO_SHOW then
print("ironsource_callback: INTERSTITIAL_DID_FAIL_TO_SHOW")
ironsource.load_interstitial()
elseif message_type == ironsource.INTERSTITIAL_DID_FAIL_TO_LOAD then
print("ironsource_callback: INTERSTITIAL_DID_FAIL_TO_LOAD")
elseif message_type == ironsource.REWARDED_AVAILABLE then
print("ironsource_callback: REWARDED_AVAILABLE")
elseif message_type == ironsource.REWARDED_NOT_AVAILABLE then
print("ironsource_callback: REWARDED_NOT_AVAILABLE")
elseif message_type == ironsource.REWARDED_DID_COMPLETE then
print("ironsource_callback: REWARDED_DID_COMPLETE")
elseif message_type == ironsource.REWARDED_DID_FAIL then
print("ironsource_callback: REWARDED_DID_FAIL")
elseif message_type == ironsource.REWARDED_DID_OPEN then
print("ironsource_callback: REWARDED_DID_OPEN")
elseif message_type == ironsource.REWARDED_DID_CLOSE then
print("ironsource_callback: REWARDED_DID_CLOSE")
elseif message_type == ironsource.REWARDED_DID_CLICK then
print("ironsource_callback: REWARDED_DID_CLICK")
elseif message_type == ironsource.REWARDED_DID_START then
print("ironsource_callback: REWARDED_DID_START")
elseif message_type == ironsource.REWARDED_DID_END then
print("ironsource_callback: REWARDED_DID_END")
end
end
For more details, integration docs and code examples see extension’s github page.
Hi, I don’t have plans to update this extension in near future because I’ve stepped out from developing on Defold (Unity just fits better my actual business needs, nothing personal, defolders ). So feel free to fork it and do whatever you want with the sources. Good luck
@marat.giliazov How do you integrate other networks as part of the mediation?
I understand I need to integrate other SDKs, but how to link them ironsource?
Is there any example available for this?
SEVERE: /tmp/.gradle/unpacked/com.facebook.android-audience-network-sdk-6.4.0.aar/AndroidManifest.xml:12:9-55 Error:
Missing 'package' key attribute on element package at AndroidManifest.xml:12:9-55
May 13, 2021 9:05:13 AM com.defold.manifestmergetool.ManifestMergeTool$ILoggerWrapper error
SEVERE: /tmp/.gradle/unpacked/com.facebook.android-audience-network-sdk-6.4.0.aar/AndroidManifest.xml Error:
Validation failed, exiting
May 13, 2021 9:05:13 AM com.defold.manifestmergetool.ManifestMergeTool$ILoggerWrapper warning
WARNING:
See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
May 13, 2021 9:05:13 AM com.defold.manifestmergetool.ManifestMergeTool main
SEVERE: java.lang.RuntimeException: Failed to merge manifests: com.android.manifmerger.MergingReport@6c49835d