Skip to content

solar2d/com.cabagomez-plugin.ironsource

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

com.cabagomez-plugin.ironsource

Solar2d Ironsource Plugin.

-- The iOS version min OS is iOS 12.
-- The Amazon/Android min OS is Android 21 before Solar2d 3707 and Android 24 after Solar2d 3706
-- The frameworks for the networks have been bitcode and anything other than arm64 stripped.
-- User messaging platform (UMP) for consent is integrated into the plugin.

-- If you find an issue please submit an issue on this repo. If I am able to reproduce it and impacts me, I will try to resolve it. If you need more support than this or want to individually ad plugins, I would recommend the ironsource plugin by Scott Harrison: https://solar2dmarketplace.com/plugins?IronSource_tech-scotth

  1. Add the plugin.
    ["plugin.ironsource"] = 
        {
            publisherId = "com.cabagomez"
        },
  1. Add to your build settings file:
    For android:
android =
    {
        minSdkVersion = "21", -- or minSdkVersion = "24" please read above.
    }

For iOS:

iphone =
	{
        plist =
		{
            MinimumOSVersion = "12",
        }
    }
  1. Reference the plugin:
local ironsource = require("plugin.ironsource")
  1. Init.
ironsource.init(
    adListerner, -- Listener. Required.
        {
            key=<replace with your key>, -- Your ironsource app key. Required.
            showDebugLog=false, -- Optional debug param. Defaults to false. Show extended logs.
            coppaUnderAge=false, -- Optional. Defaults to false.
            gdprUnderAge=false, -- Optional. Defaults to false.
            showValidateIntegrationUI=false, -- Optional. Shows integration validation UI. Defaults to false.
            userId="xsdsfsd", -- Optional. UserId. If not provided ironsource will autogenerate one.
            hasUserConsent=false, -- Optional. Targeted ads. Defaults to false.
            ccpaDoNotSell=false, -- Optional. False = Sell the data. True = do not sell. Default is false.
            isAutoLoad = true, -- Optional. True = Banner and Interstitial will autoload. Default is true.
            consentView = false, -- Optional. True = send consent view events. iOS only. Default is false.
            attStatus = "authorized", -- Optional. Sending "authorized" will let Facebook know that tracking is enabled. Otherwise it will set it to not enabled.
            showConsentDialog = true, -- Optional. Enables consent dialog.
            iAmInEurope = true, -- Optional. Tests the consent dialog by placing the user in the EU.
            deviceTestId = "DABA74EACEC5434B8BFB152A3504B10A" -- Optional. REQUIRED if iAmInEurope is set to true.

        } -- Table with options.
    )
  1. Show.
    ironsource.show("<adtype>", -- Ad type. Valid values are: "interstitial", "rewardedVideo", "banner", "consentView"
        {
            y=<bannerPosition>, -- Optional. Valid for banner. Valid values are "top" and "bottom". Defaults to "bottom".
            placementName=<placement name> -- Optional. Valid for "rewardedVideo", "interstitial".
        } -- Optional table.
    )
  1. Is Available.
    ironsource.isAvailable("<adtype>",
        {
            placementName=<placement name> -- Optional. Valid for "rewardedVideo", "interstitial", "banner".
        } -- Optional table.
    
    )
  1. Hide.
    ironsource.hide() -- Only functions for banner.
  1. Load.
   ironsource.load( "<adType>", -- Ad type. Valid values are: "interstitial", "banner". 
        "<network>" -- Optional. Only one supported is "aps". Amazon ads have to be loaded intentionally.
    ) 
   -- Ironsource autoloads rewarded.

Load all ads network except Amazon:

ironsource.load( "interstitial" )

Load Amazon ad:

ironsource.load( "interstitial", "aps")
  1. Set custom properties.
ironsource.setCustomProperty(
    "<keyName>", 
    "<keyValue>"
)
  1. Logs example:

loaded ("interstitial", "banner")

ironsource:	{
    "data":"",
    "name":"ironsource",
    "phase":"loaded",
    "provider":"ironsource",
    "response":"", -- If error. The error reason would be here.
    "type":"<adType>",
    "isError":false -- Always true for show.
}

show ("rewardedVideo"-on error, "interstitial")

ironsource:	{
    "data":"",
    "name":"ironsource",
    "phase":"show",
    "provider":"ironsource",
    "response":"", -- If error. The error reason would be here. Always populated for rewarded.
    "type":"<adType>",
    "isError":false -- Always true for rewarded.
}

available ("rewardedVideo")

ironsource:	{
    "data":"",
    "name":"ironsource",
    "phase":"available",
    "provider":"ironsource",
    "response":"<isAvailable>", -- true it is currently available and loaded. If the ad expires you will get a similar event but false.
    "type":"<adType>",
    "isError":false -- Would be true if it couldn't load.
}

reward ( "rewardedVideo" )

ironsource:	{
    "data":"",
    "name":"ironsource",
    "phase":"reward",
    "provider":"ironsource",
    "response":"<>", -- error string if isError = true or awarded credit as string.
    "type":"<adtype>",
    "isError":false -- No error available for rewardedVideo.
}

opened ("rewardedVideo", "interstitial")

closed ("rewardedVideo", "interstitial")

started ("rewardedVideo" )

ended ("rewardedVideo" )

presented ("banner")

dismissed ("banner")

adLeftApp ("banner")

ironsource:	{
    "data":"",
    "name":"ironsource",
    "phase":"opened",
    "provider":"ironsource",
    "response":"", -- Never filled for these phases.
    "type":"rewardedVideo", 
    "isError":false -- Always false for these phases.
}

clicked ("rewardedVideo", "interstitial", "banner")

ironsource:	{
    "data":"",
    "name":"ironsource",
    "phase":"clicked",
    "provider":"ironsource",
    "response":"<placementname>", -- Placement name. Rewarded only.
    "type":"<adType>",
    "isError":false
}

segmentReceived -- Segment being used by this particular user

ironsource:	{
      "data":"",
      "name":"ironsource",
      "phase":"segmentReceived",
      "provider":"ironsource",
      "response":"<segmentName>",
      "type":"segment",
      "isError":false
    }   

Current versions for android:

--------------- AppLovin
Adapter 4.3.41
SDK Version - 12.1.0

--------------- APS Network
Adapter 4.3.10
SDK Version - 9.8.+

--------------- Chartboost
Adapter 4.3.14
SDK Version - 9.6.0

--------------- Facebook
Adapter 4.3.45
SDK Version - 6.16.0

--------------- Google (AdMob and Ad Manager)
Adapter 4.3.41
SDK Version - 22.6.0

--------------- IronSource
Adapter 7.7.0

--------------- Pangle
Adapter 4.3.23
SDK Version - 5.6.0.4

--------------- Smaato
Adapter 4.3.9
SDK Version - 22.0.2

--------------- Vungle
Adapter 4.3.21
SDK Version - 7.1.0

--------------- Unity
Adapter 4.3.34
SDK Version - 4.9.2



Current versions for Amazon


--------------- APS Network
Adapter 4.3.13
SDK Version - 9.10.+

--------------- Chartboost
Adapter 4.3.16
SDK Version - 9.7.0

--------------- Google (AdMob and Ad Manager)
Adapter 4.3.44
SDK Version - 23.2.0

--------------- IronSource
Adapter 8.3.0

--------------- Vungle/Liftoff
Adapter 4.3.25
SDK Version - 7.4.0



Current version for iOS


--------------- Applovin
SDK - Version 12.4.0
Adapter - Version 4.3.40

--------------- Chartboost
SDK - Version 9.9.2
Adapter - Version 4.3.15

--------------- APS
SDK - Version 4.10.1
Adapter - Version 4.3.7

--------------- Google (AdMob and Ad Manager)
SDK - Version 12.7.0
Adapter - Version 4.3.46

--------------- IronSource
SDK - Version 8.1.1
Adapter - Version 8.1.1

--------------- Meta
SDK - Version 6.12.0
Adapter - Version 4.3.39

--------------- UnityAds
SDK - Version 4.12.1
Adapter - Version 4.3.31

--------------- Liftoff (Vungle) SDK - Version 7.5.2
Adapter - Version 4.3.29

About

No description, website, or topics provided.

Resources

License

MIT, Zlib licenses found

Licenses found

MIT
LICENSE
Zlib
LICENSE.md

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •