Xcode iPhone - 添加框架有点作用
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1104207/
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
Xcode iPhone - Adding framework works a little bit
提问by quano
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.
没什么大不了的,但是当我为 iPhone 添加 AVFoundation 框架时,它由于某种原因变成了红色,我不知道为什么。除非我添加这个框架,否则项目不会编译,如果我这样做,Xcode 会将框架标记为红色(显然这意味着 xcode 找不到框架),但它仍然可以工作。
This is quite annoying. Any clue what I might be doing wrong here?
这很烦人。任何线索我可能在这里做错了什么?
回答by David Wong
Try adding AVFoundation framework via your target.
尝试通过您的目标添加 AVFoundation 框架。
- Look for your target under "Groups and Files"
- "Get Info" for it
- Click the "General" tab
- At the bottom right of the window click the "+" button
- At the top of your list you should find AVFoundation, add it.
- 在“组和文件”下查找您的目标
- 为它“获取信息”
- 单击“常规”选项卡
- 单击窗口右下角的“+”按钮
- 在您的列表顶部,您应该找到 AVFoundation,添加它。
回答by quano
- close Xcode
- delete your project
- shut down your mac
- take the mac back to your boss and tell him it's not working
- wait until they figure out what it is
- if this doesn't work, find a new job that doesn't require the use of a mac
- 关闭 Xcode
- 删除你的项目
- 关闭你的 Mac
- 把 mac 带回你的老板,告诉他它不工作
- 等到他们弄清楚它是什么
- 如果这不起作用,请找一份不需要使用 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.
我所要做的就是打开项目的“常规”设置选项卡并更改“所有配置的基础 SDK”值。它被设置为我不再安装的 SDK。