0

I am following a tutorial in order to connect my app to facebook. When I import JSON and ASIHTTPRequest libraries I cant call headers to use function in that libraries

import problem

I have added "${SRCROOT}" with quotes two the Header Search Path Debug and Header Search Path Release

settings

It didnt work.

i have also looked at this to questions but couldnt make it done ASIHTTPRequest; installation issues

Adding system header search path to Xcode

thanks in advance for any help.

Community
  • 1
  • 1
SpaceDust__
  • 4,844
  • 4
  • 43
  • 82

2 Answers2

2

You need to add the folder containing the AFNetworking headers to User Header Search Paths.

It looks like that would be $(SRCROOT)/AFNetworking/AFNetworking for you.

(Also, same applies to your JSON library.)

Steven Fisher
  • 44,462
  • 20
  • 138
  • 192
0

I cant believe how dummy Xcode works I have just deleted all JSON, Classes and Reachability folders and copied again all the headers without the folders now it works. I can't understand why headers work outside offolders? but

anyways if anyone tries all other solution and it doesnt work maybe this solution can work. enter image description here

SpaceDust__
  • 4,844
  • 4
  • 43
  • 82
  • You let Xcode copy them, right? You shouldn't've done this. You now have an epic mess to clean up. Delete all the extra files and fix your search path. – Steven Fisher Jun 16 '12 at 21:25
  • Yes Xcode copied them like in the tutorial, I guess I will start all over because that was an experiment to learn how to connect facebook. – SpaceDust__ Jun 16 '12 at 21:43
  • 1
    Yeah, that's probably for the best. In your original screenshot, it looks like you picked "Copy items" and "Create folder references". Instead, leave "Copy items" off and pick "Create groups." :) – Steven Fisher Jun 16 '12 at 21:51