podspec JSQMessagesViewController non-modular header
podspec JSQMessagesViewController non-modular header
我想使用 JSQMessagesViewController
作为我的 swift pod 的依赖项。当我构建我的示例应用程序时,我得到了与 JSQSystemSoundPlayer
相关的旧 non-modular header 错误,但我不知道如何使用 XCode 7
.[=18 来解决它=]
Podspec:
s.dependency 'JSQSystemSoundPlayer'
s.dependency 'JSQMessagesViewController', '7.2.0' #Also tried 5.3.2
错误:
问题是 Swift 不能很好地将非模块化框架导入到框架中。本质上,当将一个框架捆绑到另一个框架中时,您只会 运行 遇到这个问题。有一个简单的解决方案,但它需要 JSQSystemSoundPlayer 和 JSQMessagesViewController 的一些工作。两个项目都需要具有以下 Xcode 项目设置:DEFINES_MODULE = YES.
这是 JSQMessagesViewController v7.2.0
的一个已知问题:https://github.com/jessesquires/JSQMessagesViewController/pull/1284
检查这个拉取请求:https://github.com/jessesquires/JSQMessagesViewController/pull/1284
具体来说,来自 jessesquires(作者)的评论:https://github.com/jessesquires/JSQMessagesViewController/pull/1284#issuecomment-181132880
根据该线程,修复将成为 v7.2.1
的一部分。
与JSQSystemSoundPlayer
无关。
在 Podfile
的开头添加:
platform :ios, '8.0'
use_frameworks!
所以应用程序将使用框架而不是静态库来包含项目。
对 JSQMessagesViewController 的更改摘要:
- 将 Podfile 平台更改为 iOS 8 (
platform :ios, '8.0'
)
- 更改 Podfile 以使用框架而不是静态库(
use_frameworks!
)
- 将项目结构部署目标更改为 iOS 8
- 运行 pod 安装
- 构建 & 运行 应用程序
我想使用 JSQMessagesViewController
作为我的 swift pod 的依赖项。当我构建我的示例应用程序时,我得到了与 JSQSystemSoundPlayer
相关的旧 non-modular header 错误,但我不知道如何使用 XCode 7
.[=18 来解决它=]
Podspec:
s.dependency 'JSQSystemSoundPlayer'
s.dependency 'JSQMessagesViewController', '7.2.0' #Also tried 5.3.2
错误:
问题是 Swift 不能很好地将非模块化框架导入到框架中。本质上,当将一个框架捆绑到另一个框架中时,您只会 运行 遇到这个问题。有一个简单的解决方案,但它需要 JSQSystemSoundPlayer 和 JSQMessagesViewController 的一些工作。两个项目都需要具有以下 Xcode 项目设置:DEFINES_MODULE = YES.
这是 JSQMessagesViewController v7.2.0
的一个已知问题:https://github.com/jessesquires/JSQMessagesViewController/pull/1284
检查这个拉取请求:https://github.com/jessesquires/JSQMessagesViewController/pull/1284
具体来说,来自 jessesquires(作者)的评论:https://github.com/jessesquires/JSQMessagesViewController/pull/1284#issuecomment-181132880
根据该线程,修复将成为 v7.2.1
的一部分。
与JSQSystemSoundPlayer
无关。
在 Podfile
的开头添加:
platform :ios, '8.0'
use_frameworks!
所以应用程序将使用框架而不是静态库来包含项目。
对 JSQMessagesViewController 的更改摘要:
- 将 Podfile 平台更改为 iOS 8 (
platform :ios, '8.0'
) - 更改 Podfile 以使用框架而不是静态库(
use_frameworks!
) - 将项目结构部署目标更改为 iOS 8
- 运行 pod 安装
- 构建 & 运行 应用程序