Swift编译器错误:“框架模块内的非模块化头文件” [英] Swift compiler error: "non-modular header inside framework module"

查看:474
本文介绍了Swift编译器错误:“框架模块内的非模块化头文件”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在我想将我的ObjC框架迁移到Swift,并且出现以下错误:

 包含非模块头文件在框架模块中'SOGraphDB'

引用是一个头文件,它只是定义了一个协议,在一些类中使用这个头文件来使用这个协议。

似乎与模块特性有关,但目前不太清楚如何修复,你知道吗解决方案?

更新:

这是一个Swift编译器错误。



更新2:

快速修复(但不解决根本原因)是将以下设置设置为yes:
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES

解决方案

您的标题是公开的吗?

文件在项目浏览器中。然后在xcode右侧的部分中,您会注意到目标旁边有一个下拉菜单。将其从项目更改为公共。这为我工作。



p>

Now I would like to migrate my ObjC framework to Swift and I got the following error:

include of non-modular header inside framework module 'SOGraphDB'

The references is to a header file which just define a protocol and I use this header file in some classes to use this protocol.

Is seems related to the module feature but it is at the moment not quite clear how to fix, do you know a solution?

UPDATE:

This is a Swift compiler error.

UPDATE 2:

A quick fix (but not solving the root cause) is to set the following setting to yes: CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES

解决方案

Is your header public?

Select the header file in the project explorer. Then in the section on the right in xcode, you'll notice there is a dropdown next to the target. Change that from "project" to "public". This worked for me.

这篇关于Swift编译器错误:“框架模块内的非模块化头文件”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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