0

Lately any framework I attempt to add to my project fails with "No such file or directory".

Eg for GameKit:
<GameKit/GameKit.h>: No such file or directory

The strange thing is that the frameworks that I added some time ago are found, but if i try to add the same framework now, I get this error. Where should I look? Hope I don't have to re-install xcode for this:(

To add a framework I use the steps described here (to remove the suspicion that I don't add it in the right manner): How to "add existing frameworks" in Xcode 4?

Also I've checked here:

/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/System/Library/Frameworks/GameKit.framework/

and the framework does exist. The base SDK is set to 4.3(latest), so that's not the problem either.

Community
  • 1
  • 1
Rad'Val
  • 8,895
  • 9
  • 62
  • 92

2 Answers2

0

It must not exist. It either got deleted or never existed to begin with, which makes me think it must have got deleted. Sorry, buddy.

iOS developer
  • 317
  • 2
  • 10
  • 20
0

I'm not sure if this is going to work, but I use another method to add frameworks, which is go to your project (The one with the xcodeproj icon), then click on your target. There, you can add the frameworks you want.

If that doesn't work, then try go to /Library/Frameworks to see if your framework you want is still there. If it's there and it's still getting that error, try manually adding the framework which is the add other button when you add a framework.

Srikar Appalaraju
  • 71,928
  • 54
  • 216
  • 264
TheAmateurProgrammer
  • 9,252
  • 8
  • 52
  • 71
  • Never mind. My bad. This does not work for the iPhone. It's only for the Mac OS platform. – TheAmateurProgrammer Sep 25 '11 at 14:07
  • I've already tried both methods you describe with no luck :(. I get the auto complete for all GameKit classes but still get the error. – Rad'Val Sep 25 '11 at 14:10
  • Why doesn't it work? It works just fine. I mean, you can do that, however it doesn't solve my problem. – Rad'Val Sep 25 '11 at 14:11
  • hm… I'm not sure why. I was able to import the gamekit to a sample project with the iOS 4.3 SDK + xcode 4.0 (snow leopard). Try copying the GameKit framework to your desktop and link the framework to your project. If that still doesn't work, I'd probably reinstall xcode. – TheAmateurProgrammer Sep 25 '11 at 14:22
  • yeah...end up re-installing. Thanks anyway! – Rad'Val Sep 25 '11 at 14:38