3

我在Xcode 7.2.x中使用Sqlite.swift 。它工作正常。

我已将 Xcode 更新到 Xcode 7.3,Sqlite.swift 框架出现问题。

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/module.modulemap:1:8: error: redefinition of module 'Compression'
module Compression [system] [extern_c] {
       ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/usr/include/module.modulemap:1:8: note: previously defined here
module Compression [system] [extern_c] {
       ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/module.modulemap:6:8: error: redefinition of module 'Darwin'
module Darwin [system] [extern_c] {
       ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/usr/include/module.modulemap:6:8: note: previously defined here
module Darwin [system] [extern_c] {
       ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/module.modulemap:1478:8: error: redefinition of module 'os'
module os [system] [extern_c] {
       ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/usr/include/module.modulemap:1599:8: note: previously defined here
module os [system] [extern_c] {
       ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/module.modulemap:1494:8: error: redefinition of module 'libkern'
module libkern [system] [extern_c] {
       ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/usr/include/module.modulemap:1615:8: note: previously defined here
module libkern [system] [extern_c] {
       ^
<unknown>:0: error: could not build Objective-C module 'SQLite'

使用版本:pod 'SQLite.swift', '~> 0.9.2'

我发现了一个具有相同问题的封闭池请求。https://github.com/stephencelis/SQLite.swift/issues/349

我尝试使用以下分支:

pod 'SQLite.swift',
  git: 'https://github.com/stephencelis/SQLite.swift.git',
  branch: 'cocoapods-xcode-7-3'

但我无法解决这个问题。

等待真正的解决方案。

4

3 回答 3

4

SQLite.swift 存储库的“master”分支与 Xcode 7.3 不兼容。

好在作者已经做了一个兼容的分支:

https://github.com/stephencelis/SQLite.swift/tree/cocoapods-xcode-7-3

这是您应该在 Xcode 7.3 中使用的那个(我使用它没有任何问题)。

这是同一个存储库:它只是一个不同的分支。我们可以猜测,只要作者认为合适,它就会与“master”合并。

于 2016-03-29T12:18:44.597 回答
3
于 2016-03-29T12:44:16.933 回答
0

我正在使用 Xcode 7.3 和 Cocoapods 版本1.0.0.beta.5。我没有使用最新版本的 Cocoapods,因为几周前它给我正在使用的其他 pod 带来了很多问题,我不想再次更新它,直到我觉得它更稳定了。

什么对我有用:

  1. 清理构建文件夹(键绑定Option-Shift-Command-K:)
  2. 删除Pods/目录并删除Podfile.lock文件(不要删除Podfile!)
  3. 使用以下命令确认您的 podfile 包含指向 github url 的导入语法:

pod 'SQLite.swift', git: 'https://github.com/stephencelis/SQLite.swift.git'

  1. 保存您的 Podfile 编辑(如果有)
  2. pod install
于 2016-04-10T22:55:04.273 回答