【问题标题】:Include of non-modular header inside framework module - Xcode 9.2在框架模块中包含非模块化标头 - Xcode 9.2
【发布时间】:2018-09-28 17:06:48
【问题描述】:
当我尝试在我的框架中使用 pod 安装谷歌分析时,pod 已成功添加到我的框架项目中。但是当我尝试在我的框架伞头文件中导入#import <Google/Analytics.h>时,我得到了这个错误。我正在使用 Xcode 9.2 和我的 swift 内置框架。
【问题讨论】:
标签:
ios
objective-c
swift
google-analytics
ios-frameworks
【解决方案1】:
首先,选择 GoogleAnalytics SDK 文件夹并将其拖放到框架应用程序中。然后在 Build Phases-> Headers-> public 中将所有 .h 文件作为 public 添加。
而且你还需要在General中添加以下支持框架->
Embedded Binaries:
SystemConfiguration.framework
CoreData.framework
ImageIO.framework
libz.tbd
libsqlite3.tbd
libGoogleAnalytics.a
清理并运行构建您的框架项目,它将成功运行。