I am trying to integrate Facebook plugin (objective-C) with cocos2dx.I can successfully run the code in application didFinishLaunchingWithOptions inside AppController.mm
This code runs when the application starts (in objective-c), but how do I invoke this code from a CCScene or a CCLayer (in .cpp instead of .mm) ?
May be you should do like this:
// some functions
// xxx.mm, invoke the objective-c to implement it
Then, other c*+ code can include xxx.h, and use it like a normal c*+ class.
I’m not sure what Zhang means… did you get this to work?… i’d like to know this also.
You can referCocosDenshion/include/SimpleAudioEngine.hCocosDenshion/iphone/SimpleAudioEngine.mm
Got it, thanks for that.