callbacks obj-c to c++

Hi all,

I am making a cross platform game for Android and Ios.
I first focus on Ios.
An this is my problem.

I have to login to facebook, and I made a static class called NativeManager
This helps me to call a function and it will do the android part or the ios part of it.
But I want to log in to facebook so I call NativaManager::FacebookLogin() for example.
This will go to a mixed c++ / obj-c class and that goes to a pure obj-c class. Here in I have code
to login with facebook and I get a delegate callback that user is logged in.
But I have nu damn clue, how I can go all the way back and let the first class that called NativaManager::FacebookLogin()
now that the user is logged in.

I hope someones understands my question :S

any help is appreciated.

friendly regards,

Seppe

hi,

in my blog I have a tutorial about this, http://www.jesusbosch.com/2012/07/communication-between-c-and-objective-c.html?m=1

I hope it helps

Sorry for late reply :slight_smile: Ty it helped me to get started :smiley:

Does anyone have working example of callback? I can not reproduce it using Jesus tutorial

Hi Ivan,

It is not a sophisticated way to do it, but my callback just sends a pointer to the original class to a different class that has to make the callback. Then from than destination class call back another method in the source class.

Hope this helps.

JB