xcode 在框架模块错误中包含非模块化标头

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/38423565/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 09:03:17  来源:igfitidea点击:

Include of non-modular header inside framework module error

iosxcodeparse-platformparse-server

提问by vikzilla

Trying to integrate ParseLiveQuerycocoapod into my project, but when building I keep getting the error:

尝试将ParseLiveQuerycocoapod集成到我的项目中,但是在构建时我不断收到错误消息:

Include of non-modular header inside framework module error 'Bolt.BFCancellation'

在框架模块错误“Bolt.BFCancellation”中包含非模块化标头

enter image description here

在此处输入图片说明

I installed ParseLiveQuery(along with Parse) via cocoapods. Here's my podfile:

我通过 cocoapods安装了ParseLiveQuery(连同 Parse)。这是我的 podfile:

use_frameworks!

pod 'ParseLiveQuery'
pod 'Parse'

post_install do |installer|
  installer.pods_project.build_configuration_list.build_configurations.each do |configuration|
    configuration.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES'
  end
end

I have also set Allow Non-module Includes In Framework Modulesto Yesin build settings, but still get this error.

我还在构建设置中将允许非模块包含在框架模块中设置为,但仍然出现此错误。

回答by Nick

Just ran into this myself. I added the header file to the Framework's umbrella header, and then added it to the Headers section as Public. (I'm adding Reachability lib)

我自己就遇到了这个。我将头文件添加到框架的伞头文件中,然后将其作为公共添加到标题部分。(我正在添加可达性库)

enter image description here

在此处输入图片说明

So far it seems to be working for me without trouble.

到目前为止,它似乎对我来说没有问题。

回答by Vittal Pai

I solved it removing Modulesfolder from the framework.

我解决了Modules从框架中删除文件夹的问题。

  • Browse to your framework location which is present in the App Project using finder

  • Go inside Test.frameworkfolder (In the above case it will be ParseLiveQuery.framework) & Delete Modulesfolder.

  • Clean and Re Build the app, it will solve the problem.

  • 使用 finder 浏览到存在于 App 项目中的框架位置

  • 进入Test.framework文件夹(在上述情况下,它将是ParseLiveQuery.framework)&删除Modules文件夹。

  • 清理并重新构建应用程序,它将解决问题。