Error when RevMob minibanner ads runs

157 Views Asked by At

I'm trying to implement banner ads with revMob, but when I test on my device (iPhone 4, iOS 7), the app crashes and it returns this messages:

2014-05-19 18:42:24.050 hero_rush iOS[522:60b] [RevMob] Banner did received.
2014-05-19 18:42:24.089 hero_rush iOS[522:60b] *** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [inf nan]'
*** First throw call stack:

This is how I'm implementing the mini banner:

revmob::RevMob *revmob = revmob::RevMob::SharedInstance();
    revmob->ShowBanner();

EDIT

This is related to cocos2d-x, because I'm using RevMob SDK for cocos2d-x.

2

There are 2 best solutions below

4
On

Have you done this in appdelegate.cpp

bool AppDelegate::applicationDidFinishLaunching()
 {
revmob::RevMob *revmob = revmob::RevMob::SharedInstance();

 #if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
 revmob->StartSession("YOUR IOS APPID");
 #elif (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
 revmob->StartSession("YOUR IOS ANDROID");
 #endif

  /* your app code */

   return true;
  }
0
On

RevMob (https://www.revmobmobileadnetwork.com) released a new version (1.2.1) of their SDK: http://sdk.revmobmobileadnetwork.com/cocos2dx.html#download.

Did you try it? Does this version present the same issue?