iOS SDK broken ever after reinstall UIKit and Foundation frameworks not found(重新安装 UIKit 和 Foundation 框架后 iOS SDK 损坏)
问题描述
对于 pch 文件,我收到以下错误:
For the pch file I get these errors:
/Users/matt/Programming/iPhone Monkey Curling lite/iPhone_Monkey_Curling_Prefix.pch:6:34: error: Foundation/Foundation.h: No such file or directory
/Users/matt/Programming/iPhone Monkey Curling lite/iPhone_Monkey_Curling_Prefix.pch:6:34: error: Foundation/Foundation.h: No such file or directory
/Users/matt/Programming/iPhone Monkey Curling lite/iPhone_Monkey_Curling_Prefix.pch:7:24: error: UIKit/UIKit.h: No such file or directory
/Users/matt/Programming/iPhone Monkey Curling lite/iPhone_Monkey_Curling_Prefix.pch:7:24: error: UIKit/UIKit.h: No such file or directory
这是默认情况下的文件:
Here's the file as it is by default:
//
// Prefix header for all source files of the 'iPhone Monkey Curling' target in the 'iPhone Monkey Curling' project
//
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#endif
我重新安装了 Xcode 和 iOS SDK,但这并没有解决问题.将 iAd 框架添加到我的一个项目后出现此问题,但我的所有项目都无法编译.
I reinstalled Xcode and the iOS SDK but that did not fix the problem. This problem occurred after adding the iAd framework to one of my projects but all of my projects won't compile.
我使用的是最新的 SDK (4.1).
I'm using the latest SDK (4.1).
框架在项目中.出于某种原因,当我尝试添加新框架时,它会列出 iOS 项目中的 OS X 框架.
The frameworks are there in the project. For some reason, when I try to add a new framework, it lists the OS X ones in an iOS project.
感谢您的帮助.
推荐答案
在 Apple 开发者论坛上,我设法获得了有关问题的帮助.事实证明,构建选项被设置为奇怪的东西.
On the Apple developer forums I managed to get help on pin-pointing the issue. It turns out somehow a build option was set to something odd.
这是框架搜索路径"选项.如果有人遇到类似问题,请确保这是空的.
It was the "Framework Search Paths" option. Make sure this is empty if anyone has a similar problem.
这篇关于重新安装 UIKit 和 Foundation 框架后 iOS SDK 损坏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:重新安装 UIKit 和 Foundation 框架后 iOS SDK 损坏
- GPS状态的广播接收器? 2022-01-01
- 网上有没有好的 UIScrollView 教程? 2022-01-01
- SetOnItemSelectedListener上的微调程序错误 2022-01-01
- URL编码Swift iOS 2022-01-01
- UITextView 内容插图 2022-01-01
- 在 Iphone SDK 的导航栏上添加多个按钮 2022-01-01
- 如何在 iPhone 模拟器中重置 NSUserDefaults 数据? 2022-01-01
- 类似于 Mail.app 的 iPad 模态视图控制器? 2022-01-01
- Xcode 7.3 中带有 UILabel 的 UIStackView 2022-01-01
- 使用自动布局向 UIScrollView 添加动态大小的视图 2022-01-01