views:

2567

answers:

3

No biggie, but when I add the AVFoundation framework for the iPhone, it turns red for some reason I'm unable to figure out why. The project will not compile unless I add this framework, and if I do, Xcode will mark the framework red (apparently that means xcode cannot find the framework), but yet it will work.

Here are some screenshots:

http://www.getdropbox.com/gallery/608462/1/xcode?h=f9e8b5

(Click first one and then just continue clicking the images that appear to go to the next one.)

This is quite annoying. Any clue what I might be doing wrong here?

+4  A: 

Try adding AVFoundation framework via your target.

  1. Look for your target under "Groups and Files"
  2. "Get Info" for it
  3. Click the "General" tab
  4. At the bottom right of the window click the "+" button
  5. At the top of your list you should find AVFoundation, add it.
David Wong
Hm, this is odd. The AVFoundation framework isnt in the list @ step 5. Image:http://files.getdropbox.com/u/608462/getinfofortarget.png
quano
Move up to version 2.2 for the SDK. That's your problem. Most people don't use 2.0 anymore.
David Wong
Double click your project file under "groups and files" then navigate to the "Build" tab and change the "Base SDK" to "iPhone Device 2.2".Hope this helps.
David Wong
Ah, that fixed it. Thanks!
quano
This is odd, now it's red again even though I'm using 2.2 or above. I didn't even do anything, just opened the project again and boom, there it is red again.
quano
Ah, nm, I got confused with Active sdk and the project properties. Somehow the Base SDK had switched again, and once I switched it to the correct sdk it started working again.
quano
A: 
  1. close Xcode
  2. delete your project
  3. shut down your mac
  4. take the mac back to your boss and tell him it's not working
  5. wait until they figure out what it is
  6. if this doesn't work, find a new job that doesn't require the use of a mac

All I had to do was open up the "General" settings tab for the project and change the "Base SDK for All Configurations" value. It was set to an SDK that I no longer had installed.

+1  A: 

Check this: http://www.mercatorgeosystems.com/blog/?p=43 It fixed for me.

Big Papoo