将特定于SDK的框架添加到Xcode

Hae*_*ntz 2 iphone xcode

Xcode 3.2打破了我的iPhone应用程序的构建过程.我需要在我的项目中添加一个新框架(MediaPlayer.framework).

所以我进入我的目标设置并尝试通过点击[+]按钮将其添加到"链接图书馆".在列表中缺少MediaPlayer.framework,以及其他框架,例如UIKit,CoreGraphic等.一些框架仍然存在.

I can add the frameworks by adding the SDK-specific ones (going into /Developer/Platforms/iPhoneOs.platform/...yadayadayada../frameworkd/) but then of course I can only compile for the iPhone platform and not for the simulator any more.

So basically I wonder how I can get Xcode back to chose the appropriate framework, depending on platform and SDK version for me?

Thanks and kind regards, Hans Schneider

Edit: Things I tried: Setting the Base SDK to 3.0 (was still 2.2.1), reinstalling 3.0 iPhone and Simulator SDK from the "packages" directory of the Xcode 3.2 DMG. Didn't help. The frameworks still wont show up in the list...

编辑2:好的,我现在将框架放回到列表中,我以前在我的AdHoc配置中.在Debug中我有框架.但它仍然不会为Simualtor编译(许多符号未找到错误).看起来链接器没有选择正确的库,并且始终使用框架的iPhoneOs3.0路径.

Mik*_*hen 6

在目标属性的构建部分中转到"框架搜索路径".

添加路径:

$(SDKROOT)/Library/System/Frameworks
Run Code Online (Sandbox Code Playgroud)

那它应该运作良好.

按"确定"后,您应该可以看到路径设置为"/库..."