Current beta version: Cocos2d-x 3.8.1 3.7 is also tried, under the version has not been measured, generally is the path change, the file name generally will not change
Note: The current project is through the control console new project, not the project created by Cocosstudio
Must first customs clearance official website: http://www.cocos.com/doc/article/index?type=cocos2d-x&url=/doc/cocos-docs-master/manual/framework/ cocos2d-js/catalog/. /.. /html5/facebook-sdk/facebook-sdk-on-ios/zh.md
found that follow the tutorial step by step, compile to linking error, heart 10,000 grass mud horse run over
This is probably the error: Ld:symbol (s) not found for architecture armv7 cannot find APPDELEGATE.O and Register_all_pluginx_protocols in register_p Luginx_js_extensions the definition of these two methods
Before Cocosstudio was successful, he looked at the works that were created before (
A wordy look:
Console Create Project : Add header file in Appdelegate
#include "jsb_cocos2dx_pluginx_auto.hpp" //pengyingh
#include "Jsb_pluginx_extension_registration.h" //pengyingh
Register the two methods of Register_all_pluginx_protocols and Register_pluginx_js_extensions,
project created by Studio : Add header files to Js_module_register.h instead and register two methods
)
found that individual folders are not imported:
Register_all_pluginx_protocols and Register_pluginx_js_extensions in
Yourproject /frameworks/cocos2d-x/plugin/jsbindings under the Auto and manual files in these two folders
Right-click Project Add Auto and manual These two folders, note check Create groups
The CPP files in the above two folders are then automatically added to the Compile sources under build phases
Then compile still error, probably jsb_pluginx_basic_conversions.h this file import header file # # # "ProtocolIAP.h" cannot find ProtocolIAP.h this file
Customs clearance of the students will find pluginprotocol.xcodeproj this link project under the Include folder has ProtocolIAP.h this file, but in our main project without the path of this folder
Need to add two paths under userheadersearchpaths under searchpaths under Main project Buildsettings
Probably like this:
$ (srcroot)/.. /.. /cocos2d-x/plugin/protocols/include
$ (srcroot)/.. /.. /cocos2d-x/plugin/protocols/platform/ios
And found out that the project could run.
Peat ~ ~ ~
Cocos2d-js iOS Access Facebook plugin