首页 > 解决方案 > 未能在 Xcode 10.1 中发出预编译头文件

问题描述

我已将代码从 swift3 更新到 swift4.2 并且收到警告,因此我通过重新安装所有 pod 来更新 podfile,现在我收到以下错误:

failed to emit precompiled header '/Users/palak.garg/Library/Developer/Xcode/DerivedData/mySocialChemist-gtbbctpiuhpyzngmqbevmscwbcet/Build/Intermediates.noindex/PrecompiledHeaders/mySocialChemist-Bridging-Header-swift_14WYMBJ6PJP8W-clang_38EYTCGHX7TO1.pch' for bridging header '/Users/palak.garg/Desktop/Code/April current project/Send-a-Script---IOS 2 2 2/mySocialChemist/Classes/mySocialChemist-Bridging-Header.h'

mysocialChemist我的项目名称在哪里,并且mySocialChemist-Bridging-Header.h正在桥接头文件。还显示最近的消息:

/Users/palak.garg/Desktop/Code/April current project/Send-a-Script---IOS 2 2 2/mySocialChemist/Main/mySocialChemistAppDelegate.h:16:9: 'Braintree/BraintreeVenmo.h' file not found

Braintree/BraintreeVenmo 是我使用的 pod。

此外,我在更新 pod 的终端上收到警告,如以下屏幕截图所示:

在此处输入图像描述

我尝试了以下几点,但对我没有任何帮助:

  1. 我卸载 pod 并重新安装,然后清理并构建项目,但没有任何效果。

  2. 同样在 Xcode > Product > Scheme > Edit Scheme > Build options 中,两个选项都被选中,如图所示。

  3. 清理派生数据并构建项目。

  4. Target > Build Settings > Swift compiler - Custom flag > Other swift flags set $(inherited) as in image

  5. 目标 > 构建设置 > 预处理器宏设置 $( inherited ),如图所示

提前致谢。

标签: swift4.2

解决方案


推荐阅读