Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

RESOLVED: Appodeal Plugin Initializes Over and Over on IOS
Started by gsglawson Nov 11 2019 09:37 AM

1 reply to this topic
appodeal init ios
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

gsglawson

[GLOBAL: userInfoPane.html]
gsglawson
  • Enthusiast

  • 72 posts
  • Corona SDK

Hi,

 

I have been using the old appodeal plugin without issue for several years now. I am upgrading to the beta version due to the new Google policy violations that the old plugin had. Everything is working as it should on Android, but on IOS the plugin keeps initializing over and over. I created a small test app and it is doing the same there as well. The test ad displays properly but the repeating appodeal.init function really affects the performance of my app. Below is my test code. I have tried both the latest public builds and daily builds. I am running xcode 10.1.

 

Thank you ahead of time for any assistance.

Scott

 

main.lua 

local appodeal = require( "plugin.appodeal" )
local json = require("json")

local function appoListener( event )
	print("APPD "..json.prettify(event))
    if event.phase == "init" then
		if event.isError == false then
			print("APPD appodeal initialized successfully", appodeal.getVersion())
			appodeal.load("banner")
		end	
	end
end

appodeal.init( appoListener, {appKey="MY_APP_KEY", testMode = true} )

local function showAd()
	print("APPD showAd")
	if appodeal.isLoaded("banner") then
		appodeal.show("banner")
		timer.cancel(myTimer)
	end
end

local myTimer = timer.performWithDelay( 5000, showAd, -1 ) 

build.settings

settings = 
{
    plugins =
    {
        ["plugin.appodeal.beta.base"] = { publisherId = "com.coronalabs" },
        ["plugin.appodeal.beta.AppLovin"] = { publisherId = "com.coronalabs" },
	-- I removed most of the ad providers just for this test
    }, 
 
	orientation = 
	{
		default = "portrait",
		supported = 
		{
			"portrait",
		}
	},
	android =
	{
		usesPermissions =
		{
			"android.permission.INTERNET",
                        "android.permission.ACCESS_NETWORK_STATE",
                        "android.permission.WRITE_EXTERNAL_STORAGE",
		},	
	},		
	iphone =
	{
		xcassets = "Images.xcassets",
		plist=
		{
            UILaunchStoryboardName = "LaunchScreen", 
            NSAppTransportSecurity = 
            {
				NSAllowsArbitraryLoads = true
            },
		},
	},
}

Output from above:

Nov 11 11:59:05 George-Scotts-iPad AppodealTest[1218] <Notice>: APPD {
  "data":{
    "pluginVersion":"1.6.0b",
    "sdkVersion":"2.5.0"
  },
  "name":"adsRequest",
  "phase":"init",
  "provider":"appodeal",
  "isError":false
}
Nov 11 11:59:06 George-Scotts-iPad AppodealTest[1218] <Notice>: APPD {
  "data":{
    "pluginVersion":"1.6.0b",
    "sdkVersion":"2.5.0"
  },
  "name":"adsRequest",
  "phase":"init",
  "provider":"appodeal",
  "isError":false
}
Nov 11 11:59:06 George-Scotts-iPad AppodealTest[1218] <Notice>: APPD appodeal initialized successfully
Nov 11 11:59:07 George-Scotts-iPad AppodealTest[1218] <Notice>: APPD appodeal initialized successfully
Nov 11 11:59:07 George-Scotts-iPad AppodealTest[1218] <Notice>: APPD {
  "data":{
    "pluginVersion":"1.6.0b",
    "sdkVersion":"2.5.0"
  },
  "name":"adsRequest",
  "phase":"init",
  "provider":"appodeal",
  "isError":false
}


[TOPIC: post.html]
#2

gsglawson

[GLOBAL: userInfoPane.html]
gsglawson
  • Enthusiast

  • 72 posts
  • Corona SDK

*** UPDATE ***

 

For future readers, this has been resolved by removing the appodeal.getVersion() command out of the print statement located in the listener. Not sure why Android was ok with it but IOS was not.

 

From:

print("APPD appodeal initialized successfully", appodeal.getVersion())

 

To:

print("APPD appodeal initialized successfully")




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: appodeal, init, ios