Adding Facebook Connect to my iPhone Project
Asked Answered
K

5

6

I'm having trouble adding Facebook Connect to my iPhone Project. Here's the directory structure:

-> MyProject
----> MyProject.xcodeproj
----> fbconnect-iphone
----> build/
----> <other files and folders>

As directed,

  1. I opened fbconnect-iphone/src/FBConnect.xcodeproj project file.
  2. I dragged the FBConnect group into my application's Xcode project.
  3. I kept "Copy items into destination group's folder (if needed)" checkbox OFF.

As directed,

  1. I went to Projects > Edit Project Settings.
  2. Looked for "Header Search Path" in Search Paths category.
  3. Added "../../fbconnect-iphone/src". Kept Recursive checkbox OFF.

I used "Build" button to check if everything is fine so far. It wasn't/isn't. It give me 16 warnings and 101 errors.

What am i missing here? I'm using iPhone SDK 3.0. Xcode 3.1.3.

Regards.

Kassia answered 5/9, 2009 at 10:21 Comment(0)
K
6

Somehow the relative path "../../fbconnect-iphone/src" is not working, but absolute path does the trick. I still wonder if all this hassle can be avoided.

Kassia answered 9/9, 2009 at 7:35 Comment(0)
T
2

I had the steps you mentioned work perfectly in one project, and in another it caused 100+ errors as mentioned above. I went into the FBConnect classes and manually removed the FBConnect folder from the paths in the import lines. So #import "FBConnect/FBConnect.h" became #import "FBConnect.h", and now everything works. Go figure.

Tatro answered 1/12, 2009 at 4:4 Comment(0)
S
1

Your relative path doesn't look correct. It needs to be relative to the project file. In your case the "fbconnect-iphone" folder resides in the same place as your project file, so this should do the trick: fbconnect-iphone/src (i.e. without the ../../ at the beginning).

Studdard answered 15/11, 2009 at 17:32 Comment(0)
S
1

Place the given below path in "User Header Search Paths" in Target info. "$(SRCROOT)/HERE IS THE PATH OF YOUR FBConnect". It worked for me.

Saurischian answered 29/1, 2011 at 5:4 Comment(0)
C
0

I had to do the same thing as @ashack. I added all the files to the project and changed all the #import statements to reflect this.

Cacka answered 8/4, 2010 at 17:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.