Swift4 - Xcode 9 PCH 错误

标签 swift xcode9 pch

这个项目一直运行良好,直到我安装了一个框架。一旦框架看起来难以处理,我就将其卸载。然后,xcode 9 读取PCH错误。

我用Swift做这个项目,对OC知之甚少。怎么突然出现这个错误?

错误无法清除~~不知道为什么以及如何处理

enter image description here

更新:

我自己解决了这个问题。虽然简单粗暴,但终于成功了:

  1. 清理废弃的组织在-> project-> Link -> other Link flags
  2. 在 -> target -> Built settings -> search path -> Header search path 中清理废弃的组织。
  3. Update -> target -> Built settings -> search path ->Framework search path,丢弃不可用问题
  4. 删除以Pod开头的文件名,除Podfile外,重新执行pod install。

我仍然不知道哪种方法有效,但它终于起作用了。感觉好奇怪。

最佳答案

Shift + alt + 命令 ⌘ + K

清理派生数据,重新构建。

关于Swift4 - Xcode 9 PCH 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50782203/

相关文章:

XCode 4 归档错误 : one or more PCH files were found, 但它们无效

ios - 如何隐藏 Xcode 6 中的按钮?

来自 AST 上下文 :"的 Swift "error: in auto-import: failed to get module ' foo'

ios - UICollectionViewCell 动态宽度和固定高度

vba - 在 VBA 中下载文件并存储它

objective-c - GHUnitIOS 构建错误

ios - swift 函数和闭包可以符合 Hashable 吗?

ios - 我的自定义形状后面的颜色已填充,我想将其设为白色

ios11 - 在 Xcode9 模拟器上管理缩放级别

ios - 无法在iOS 11上获取后台位置更新