iphoneiosobjective-ccocos2d-xchartboost

Chartboost in Cocos2D-X game


I used chartboost sdk in cocos2d-x game, I can use below code in appDelegate.m and works great...but there is no c++ call for chart boost. How can I call showInterstitial API from c++ file ?

#define CHARTBOOST_APP_ID =@"Here added valid app id from chart boost account"
#define CHARTBOOST_APP_SIGNATURE @"Here added valid signature from chart boost"

Chartboost *cb = [Chartboost sharedChartboost];
cb.appId = CHARTBOOST_APP_ID;
cb.appSignature = CHARTBOOST_APP_SIGNATURE;

[cb startSession];

[cb showInterstitial];

Is there any c++ version of Chartboost SDK ?

UPDATES: Simple solution is to use Obj.C version of Chartboost SDK, then use C++ bridge class in .mm file and access it from other .cpp file. Its simple and best way.

Here is Files: Download


Solution

  • There is no C++ version of the Chartboost SDK, however many developers have successfully integrated the SDK in Cocos2d games.

    Often they write their own wrapper, but this developer has open sourced his: http://www.cocos2d-x.org/projects/cocos2d-x/assets/11 https://github.com/wenbin1989/Charboost-x