未知类型名称“NS_ASSUME_NONNULL_BEGIN" [英] Unknown type name 'NS_ASSUME_NONNULL_BEGIN'

查看:51
本文介绍了未知类型名称“NS_ASSUME_NONNULL_BEGIN"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在将现有项目中的框架集成到我的项目中时遇到此错误.

I got this error while integrating a framework from an existing project to my project.

错误:未知类型名称'NS_ASSUME_NONNULL_BEGIN'

Error : Unknown type name 'NS_ASSUME_NONNULL_BEGIN'

我该如何解决这个问题?

How could I fix this ?

推荐答案

我发现了这个问题背后的问题.

I found the issue behind this issue.

Unknown type name 'NS_ASSUME_NONNULL_BEGIN' 的问题是由于缺少 Foundation 框架而出现的.我发现 Foundation 框架已添加到 -Prefix.pch 文件中.我把它移到我的项目后忘记在框架中添加前缀标题"路径.

The issue Unknown type name 'NS_ASSUME_NONNULL_BEGIN' arise due to the missing of Foundation framework. And I found the Foundation framework is added in the -Prefix.pch file. I forgot to add the "Prefix Header" path in the framework after I moved it to my project.

所以在设置 Prefix.pch 文件的路径后,错误消失了.

So after setting the Prefix.pch file's path, the errors gone.

这篇关于未知类型名称“NS_ASSUME_NONNULL_BEGIN"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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