0

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.

user3511563
  • 397
  • 2
  • 5
  • 18

2 Answers2

0

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;
  }
Ankit Bisht
  • 1,209
  • 12
  • 14
  • Java? I'm testing on iOS. – user3511563 May 20 '14 at 11:55
  • Yes I did. I also removed "your ios appid" for my app id. But in settings it's saying to not do this. Which I think was a mistake by the typer. Is it necessary to substitute the appid? – user3511563 May 21 '14 at 04:13
  • yes appid is most necessary for the initialization of ads, the appid is the id provided by revmob when you create a new ad... – Ankit Bisht May 21 '14 at 10:17
  • ok, so i did it. but i think the problem has to do with the fact the revmob changes the size of the screen and right my app doesn't know how to handle it. – user3511563 May 21 '14 at 13:29
0

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?