cocos OC调用JS
#import "ScriptingCore.h" std::string arg ="test"; std::string funName ="UtilsPlatform.alertEmailSetting"; std::string rStr = funName + "(\"" + arg + "\");"; ScriptingCore::getInstance()->evalString(rStr.c_str()); ccc1.8版本开始要改为: #import "cocos/scripting/js-bindings/jswrapper/SeApi.h" se::ScriptEngine::getInstance()->evalString(rStr.c_str());