Closed zhouyijian closed 1 year ago
解决方案 https://stackoverflow.com/questions/27776497/include-of-non-modular-header-inside-framework-module
Allow Non-modular Includes in Framework Modules仅适用于OC。不能用于Swift。 经过一段时间的研究,发现 swift 可以给clang传递warning参数,于是设置 OTHER_SWIFT_FLAGS 为 -Xcc -Wno-error=non-modular-include-in-framework-module 禁止Swift导入错误。
目前已解决,但是这个方案不是一个最佳解决方案,最佳方案是:
真正的答案是库所有者需要更改导入的位置。这些文件 ifaddrs.h、arpa/inet.h、sys/types.h 被导入到框架中的 .h 文件中,Xcode 不喜欢这样。库维护者应该将它们移动到一个 .m 文件中。例如,请参阅 GitHub 上的这个问题,其中 AFNetworking 解决了同样的问题:https://github.com/AFNetworking/AFNetworking/issues/2205
issue标题:Swift 集成 TUIChat 相关 SDK 报错,import 后报错 Include of non-modular header inside framework module
【iOS】-【7.1.3925】:【导入SDK编译报错】 issue内容:
【当前现象】:编译不通过 【集成包】:TUIChat等TUI系列SDK 【机型】:iPhone 14 Pro Max iOS 16.3.1 【之前版本有无此问题】:未知 【有无日志或者描述、截图】:
问题截图