in cocos2d/ios, use [[UIApplication sharedApplication] openURL:] to open a url,how should i do this in cocos2d-x?
I think you can use it in cocos2d-x too, because c++ can invoke object-c in a .mm file.
thanks a lot,but if i use this with .mm file, the code can only run in ios platform, when port to android and other os, i need to change this code for diffent os.
is it that?
Is there a way cross platforms?
How about libcurl?
can libcurl only open a url in browser? not to receive the response.
i have checked the CurlTest in tests,but it will try to get a reponse.
I think you should refer the official site of libcurl for more information.It can be used for http communication.
Necropost! How are you sopposed to call this function using a c*+ iOS project? I am unable to call it either in its original for or c*+ized
I’m also intrested in opening url on iOS from cocos2d-x. I’m new to obj-c. Can anyone explain how can I call obj-c functions from cocos2d-x?
check this out
You need to rename you source file from .cpp to.mm, after that you will be able to make ObjC calls.