Chartboost Mobile Ads (Not Updated)

GeorgeN

  • Posts: 856
On a side note, I really don't like Chartboost's new dashboard.

The new dashboard is nice but some things are missing. Like the list with apps where you can see the lifetime revenue per app.

rob1221

  • *
  • Posts: 9473
With the recent OpenFL update, I'm looking into supporting the most recent SDK as a framework and having some trouble with it, but it's not required.  A more serious problem is the error message I get concerning my event listener setup.  This line...
private static var chartboostEventsIOS = Lib.load("chartboost_events" , 1);
...fails with an error message saying the integer 1 should be a string.  This does not happen for the other similar lines that have a 1 or 2.  When chartboostEventIOS is actually called as a function, it looks like this:
chartboostEventsIOS(setEventListeners);
setEventListeners is a public static function that is supposed to be passed though to the Obj-C code to be called later, but for some unknown reason this code no longer works with the OpenFL update.

Update: The other lines do fail if I comment out the event listener lines, so that means I need to change the arguments somehow.  I'm guessing Lib.load is different than Loader.load, which I had to change to because Loader doesn't seem to exist anymore.

« Last Edit: February 01, 2015, 07:47:08 am by rob1221 »

Justin

  • *
  • Posts: 4716
Lib.load is used like this now:

Lib.load(libraryName, methodName, numArgs);

So yours is probably something like this

private static var chartboostEventsIOS = Lib.load("chartboost", "chartboost_events" , 1);
For Live Support: Join our discord server and ping me @justin.
I'm most often available between 10am and 10pm Japan time. (GMT+9)

rob1221

  • *
  • Posts: 9473
I see.  It looks like the purchases extension is already set up that way, so I'll take a closer look at that.

EDIT: Fixed.  Now to check out the framework problem.

EDIT: Nope, I couldn't figure that out.  Oh well.

« Last Edit: February 02, 2015, 04:03:05 pm by rob1221 »

rob1221

  • *
  • Posts: 9473
Version 5 is now available with an updated SDK and 64-bit support for iOS.

dariolessa

  • Posts: 72
Version 5 is now available with an updated SDK and 64-bit support for iOS.

It´s fixed the landscape mode too?

rob1221

  • *
  • Posts: 9473
I tested once on iPad (don't remember version) and I saw a landscape ad in landscape mode.  But you'll need to test to be sure.

dariolessa

  • Posts: 72
Rob i try the new extension but then i try to use Start, Cache and Show the app quit.

I can´t see logs.

rob1221

  • *
  • Posts: 9473
Are you saying the game crashed?  If so, then what block specifically crashed it?  When you say you can't see logs, what are you referring to?  Chartboost event logs?

dariolessa

  • Posts: 72
Are you saying the game crashed?  If so, then what block specifically crashed it?  When you say you can't see logs, what are you referring to?  Chartboost event logs?


Events for 'play':  #MyChartboost has no field cacheInterstitial
   from scripts.ActorEvents_110
   line: 89
   columns: 8-38
Events for 'play':  #MyChartboost has no field showInterstitial
   from scripts.ActorEvents_110
   line: 90
   columns: 8-37

ertsgaming

  • Posts: 20
Hello,

I'm having the same issue...:(

Events for 'Bully':  Class<MyChartboost> has no field cacheRewardedVideo
   from scripts.ActorEvents_90
   line: 96
   columns: 8-39
Events for 'menu':  Class<MyChartboost> has no field startChartboost
   from scripts.SceneEvents_0
   line: 119
   columns: 8-36
Events for 'Yes':  Class<MyChartboost> has no field showRewardedVideo
   from scripts.ActorEvents_222
   line: 120
   columns: 8-38
Events for 'Yes':  Class<MyChartboost> has no field addEventListener
   from scripts.ActorEvents_222
   line: 121
   columns: 8-37
Events for 'Fungy':  Class<MyChartboost> has no field cacheRewardedVideo
   from scripts.ActorEvents_269
   line: 96
   columns: 8-39

rob1221

  • *
  • Posts: 9473
That's very strange.  Can you post the full logs?  I want to make sure those aren't misleading errors caused by a previous error.

dariolessa

  • Posts: 72
That's very strange.  Can you post the full logs?  I want to make sure those aren't misleading errors caused by a previous error.
Level:     INFO
When:      2015-02-03 15:33:01
From:      stencyl.sw.util.StreamGobbler

/Users/dariolessa/stencylworks/engine-extensions/chartboost/MyChartboost.hx:8: characters 7-17 : Class not found : openfl.Lib



Level:     INFO
When:      2015-02-03 15:33:01
From:      stencyl.sw.util.StreamGobbler

Source/scripts/ActorEvents_110.hx:70: lines 70-100 : Defined in this class


Level:     INFO
When:      2015-02-03 15:33:01
From:      stencyl.sw.util.StreamGobbler

Source/scripts/ActorEvents_110.hx:89: characters 8-38 : #MyChartboost has no field cacheInterstitial


Level:     ERROR
When:      2015-02-03 15:33:01
From:      stencyl.sw.io.write.resource.HXWriter

Events for 'play':  #MyChartboost has no field cacheInterstitial
   from scripts.ActorEvents_110
   line: 89
   columns: 8-38


Level:     INFO
When:      2015-02-03 15:33:01
From:      stencyl.sw.util.StreamGobbler

Source/scripts/ActorEvents_110.hx:90: characters 8-37 : #MyChartboost has no field showInterstitial


Level:     ERROR
When:      2015-02-03 15:33:01
From:      stencyl.sw.io.write.resource.HXWriter

Events for 'play':  #MyChartboost has no field showInterstitial
   from scripts.ActorEvents_110
   line: 90
   columns: 8-37

rob1221

  • *
  • Posts: 9473
Quote
Class not found : openfl.Lib
Try a blank game with no extensions and see if that builds.  I want to make sure it's a Chartboost problem before I open it up again.

Oh I forgot to ask, what Stencyl build number are you using?  You might need a recent private build, but I wasn't sure so I didn't mention it.

dariolessa

  • Posts: 72
I created a blank scene, and only a scene behavior with chartboost calls and:

Level:     INFO
When:      2015-02-03 15:39:11
From:      stencyl.sw.util.StreamGobbler

/Users/dariolessa/stencylworks/engine-extensions/chartboost/MyChartboost.hx:8: characters 7-17 : Class not found : openfl.Lib


Scene:  #MyChartboost has no field cacheInterstitial
   from scripts.Design_0_0_Scene
   line: 86
   columns: 8-38
Scene:  #MyChartboost has no field showInterstitial
   from scripts.Design_0_0_Scene
   line: 87
   columns: 8-37