Here is an extension with partial implementation of IronSource SDK for Defold: https://github.com/MaratGilyazov/def_ironsource
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.Android support implemented by @AlexeyFeskov
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.