简体   繁体   English

找不到“ ProjectName-Swift.h”文件-共享扩展名

[英]“ProjectName-Swift.h” file not found - Share Extension

We've been mixing swift with our mostly Obj-C project and it has been working fine. 我们一直在与我们主要的Obj-C项目混合使用,并且运行良好。 But when I need to add a .m file to the build phases of my extension that is importing "ProjectName-Swift.h", the extension cannot find that file. 但是,当我需要在导入“ ProjectName-Swift.h”的扩展名的构建阶段中添加.m文件时,该扩展名找不到该文件。 How can I fix this? 我怎样才能解决这个问题?

You should double check your target settings, to make sure it's configured to generate the header and that the name of the header is supplied. 您应该仔细检查目标设置,以确保已将其配置为生成标头并且提供了标头的名称。 You can find these settings quickly if you enter "header" in the search bar in the "Build Settings": 如果在“构建设置”的搜索栏中输入“标题”,则可以快速找到这些设置:

头

Also, that header isn't generated until you compile, so do a "Product" - "Clean" and "Product" - "Build". 另外,在编译之前不会生成该标头,因此“产品”-“清洁”和“产品”-“构建”也是如此。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM