Cocos2d-js iOS Access Facebook plugin

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.