升级到 Xcode 3.2 后缺少框架
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1533272/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Missing frameworks after upgrading to Xcode 3.2
提问by Dan
I upgraded to Xcode 3.2 and now can't seem to add a number of frameworks, specifically the media player. A number of frameworks do not show up on the "Add Existing Frameworks Sheet".
我升级到 Xcode 3.2,现在似乎无法添加一些框架,特别是媒体播放器。许多框架没有显示在“添加现有框架表”上。
Per another question I tried setting the "Framework Search Path" to
根据另一个问题,我尝试将“框架搜索路径”设置为
$(SDKROOT)/Library/System/Frameworks
but that didn't seem to make any difference. The UIKit.framework that is included by default when I create a new project is in
但这似乎没有任何区别。创建新项目时默认包含的 UIKit.framework 位于
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.sdk/System/Library/Frameworks
which I would expect. If I navigate to that directory I see the MediaPlayer.framework and can drag and drop it into my project successfully, but can only build and debug for a device-no suprise there, but not ideal.
这是我所期望的。如果我导航到该目录,我会看到 MediaPlayer.framework 并且可以成功地将它拖放到我的项目中,但只能为设备构建和调试 - 没有惊喜,但并不理想。
I uninstalled the dev tools with
我卸载了开发工具
mode=all
and reinstalled Xcode, but still no relief. Any help would be greatly appreciated.
并重新安装了Xcode,但仍然没有缓解。任何帮助将不胜感激。
回答by cdespinosa
Your project was probably configured to use an older SDK that's not included in the Xcode 3.2 + iPhone SDK package. Go to your target's Get Info panel, Build settings, and set the Base SDK to an SDK that's actually installed.
您的项目可能配置为使用未包含在 Xcode 3.2 + iPhone SDK 包中的旧版 SDK。转到目标的获取信息面板,构建设置,并将基础 SDK 设置为实际安装的 SDK。
If you want your app to run on older iPhone OSes, set the iPhone Deployment Target build setting to the earliest OS you want to run on.
如果您希望您的应用程序在较旧的 iPhone 操作系统上运行,请将 iPhone 部署目标构建设置设置为您想要运行的最早的操作系统。
回答by Kevin Bomberry
I just had the same issue when upgrading to 3.1.2. One thing you will want to do is open your Xcode Project, right-click on the project and Get Info... Then change the Base SDK for All Configurations to (the minimum of) 2.2.1.
升级到 3.1.2 时我遇到了同样的问题。您要做的一件事是打开您的 Xcode 项目,右键单击该项目并获取信息...然后将所有配置的基础 SDK 更改为(最小值)2.2.1。
When I did this it re-linked all of my RED (missing) Frameworks. Cheers!
当我这样做时,它重新链接了我所有的 RED(缺失)框架。干杯!
回答by ecnepsnai
I know this question is over a year old, but I just had a similar problem and solved it by looking for the missing framework in the trash and putting it back.
我知道这个问题已经有一年多了,但我刚刚遇到了类似的问题,并通过在垃圾箱中查找丢失的框架并将其放回原处来解决它。
I must've deleted it by accident!
一定是不小心删了!
回答by Raptor
Possible Solution 1: Clean Your Project Build > Clean All Target
可能的解决方案 1:清理您的项目构建 > 清理所有目标
Possible Solution 2: Make Sure Your Device is in Correct Firmware
可能的解决方案 2:确保您的设备具有正确的固件
To debug, read console log.
要调试,请阅读控制台日志。
Hope it helps.
希望能帮助到你。