开发者

fbconnect include not found by xcode

when the following include is added to my project, xcode fails to find it:

import "FBConnect/FBConnect.h"

i have added the facebook src directory to the header include path and the user header include path in the project and target settings.

when i change the include to #import "FBConnect.h" the file is found, but i get a duplicate symbol error when building: ld: "duplicate symbol _OBJC_IVAR_$_SBJSON.jsonParser in ..."

i am unclear on why the initial FBConnect/ is needed for the include, when all the source files are under the src directory, and either xcode or facebook's directions seem to be faulty, as that approach fails

thanks f开发者_StackOverflow社区or your help


Facebook API more or less say:

  • Copy the Facebook SDK into your Xcode project:
    • This can be done a number of different ways, but the easiest way is to just drag the src folder from the local Git repository for the SDK (e.g. ~/facebook-ios-sdk/src) into the app XCode project.
    • Expand src folder
    • Expand facebook-ios-sdk.xcodeproj Facebook SDK project
    • Drag and drop the "FBConnect" folder from the Facebook SDK project into your application's project.

I solve it like this: delete the folder src xcode project and asks "Remove References only" or delete. Choose remove references, compile without problems.

Only you have the FBConnect folder in your project. ;) luck

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜