无法为桥接标头发出预编译标头 [英] Failed to emit precompiled header for bridging header

查看:18
本文介绍了无法为桥接标头发出预编译标头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从 GitHub 下载了一个项目,然后 pod 以下文件,其中一些是由 OBJ-C 编写的,我使用了桥头.

I downloaded a project from GitHub, then pod the following files, some of which are written by OBJ-C and I used a bridge header.

pod ‘SnapKit’
pod ‘MJRefresh’
pod ‘Alamofire’
pod ‘Kingfisher’
pod ‘MBProgressHUD’
pod ‘pop’
pod ‘EVReflection’
pod ‘StreamingKit’
pod ‘iCarousel’
pod ‘ReflectionView’

当我使用 Xcode 9.0 beta 2 运行项目时,不幸的是错误日志如下:

When I run the project with Xcode 9.0 beta 2, but unfortunately the error log as follows :

错误:未能发出预编译头'/var/folders/kd/4gh0_kxx3jx4thjb_sssmmcw0000gn/T/EvoRadio-Bridging-Header-97bd5f.pch'用于桥接标题'/Users/ringo/Downloads/EvoRadio-master/EvoRadio/Resources/EvoRadio-Bridging-Header.h'

error: failed to emit precompiled header '/var/folders/kd/4gh0_kxx3jx4thjb_sssmmcw0000gn/T/EvoRadio-Bridging-Header-97bd5f.pch' for bridging header '/Users/ringo/Downloads/EvoRadio-master/EvoRadio/Resources/EvoRadio-Bridging-Header.h'

我用谷歌搜索过,但没有这样的问题.错误意味着它需要一个 PCH 文件?这是我的 .pch 标头配置:解决不了.

I have googled, but no such issue.The error means it needs a PCH file? This is my .pch header configuration: It can't solve it.

如何制作?

推荐答案

在为 加密核心数据.
这是我的 PodFile:

# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
pod 'EncryptedCoreData', :git => 'https://github.com/project-imas/encrypted-core-data.git'

target 'Root' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for Root

  target 'RootTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'RootUITests' do
    inherit! :search_paths
    # Pods for testing
  end

end

解决方案:
1 我将 $(inherited) non-recursive 添加到 Search Path ->标题搜索路径
2 然后将${PODS_ROOT} recursive 添加到Search Path ->用户标题搜索路径
以上都在我的项目的目标构建设置中.

Solution:
1 I added $(inherited) non-recursive to Search Path -> Header Search Paths
2 Then added ${PODS_ROOT} recursive to Search Path -> User Header Search Paths
Both the above in my projects' target build settings.

请看看这些 SO 答案:
1 继承标头搜索路径
2 继承用户搜索路径

Please have a look at these SO answers:
1 Inherit Header Search Paths
2 Inherit User Search Paths

这篇关于无法为桥接标头发出预编译标头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆