Hi there everyone!
My app worked fine until I implemented chartboost video reward ads!
I need help figuring out what is causing the crash!
Below is where I implement the ads:
[lua]–create chart boost ads
local chartboost = require “plugin.chartboost”
–The ChartBoost listener function
local function chartBoostListener( event )
for k, v in pairs( event ) do
print( tostring(k)… “=”… tostring(v) )
end
end
–Your Chartboost app id and signature for iOS
local yourAppID = “5568b9e304b0163bf576f83d”
local yourAppSignature = “02242cec3ec9b2539eb3264537c40e16934c5489”
– Initialise ChartBoost
chartboost.init {
appID = yourAppID,
appSignature = yourAppSignature,
listener = chartBoostListener
}
– Show an interstitial reward video ad
chartboost.show( “rewardedVideo” )
– Is the rewarded video cached?
print( "Has cached rewarded video: " …tostring( chartboost.hasCachedRewardedVideo() ))
–ensure that chart boost ads work!
local function systemEvent( event )
local phase = event.phase
if event.type == “applicationResume” then
– Start a ChartBoost session
chartboost.startSession( yourAppID, yourAppSignature )
end
return true
end
Runtime:addEventListener( “system”, systemEvent )[/lua]
I have also added the correct plugin info in my build.settings! Everything works fine and prints out fine on the simulator! Also the app builds fine with no errors!
All help is appreciated! Thanks!!!
-Max Goldberg