首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Sqlite.swift不使用Xcode 7.3

Sqlite.swift不使用Xcode 7.3
EN

Stack Overflow用户
提问于 2016-03-29 12:14:07
回答 3查看 2.5K关注 0票数 3

我在Xcode 7.2.x中使用Sqlite.swift。一切都很顺利。

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

代码语言:javascript
复制
/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

我试过使用以下分支:

代码语言:javascript
复制
pod 'SQLite.swift',
  git: 'https://github.com/stephencelis/SQLite.swift.git',
  branch: 'cocoapods-xcode-7-3'

但我解决不了这个问题。

等待真正的解决方案。

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2016-03-29 12:44:16

不幸的是,另一个答案是不准确的。master和最新版本0.10.1 (发布的几天前)都兼容Xcode 7.3和CocoaPods 1.0.0 beta 6。

不过,这次Xcode升级过程遇到了一些障碍,在更新CocoaPods和pod之后,多个用户需要执行以下一个或多个步骤:

  • 如果您还没有,更新到CocoaPods的最新测试版: 运行sudo gem update cocoapods --pre并重新运行pod install
  • 按住“选项”键,运行清洁构建文件夹…从Xcode的产品菜单重新构建.
  • 从项目目录中删除"Pods“文件夹并重新运行pod install
  • 如果所有这些都失败了,从“应用程序”文件夹中删除"Xcode.app“并重新安装(少数用户的Xcode安装错误)。
票数 3
EN

Stack Overflow用户

发布于 2016-03-29 12:18:44

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

幸运的是,作者已经创建了一个兼容的分支:

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

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

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

票数 4
EN

Stack Overflow用户

发布于 2016-04-10 22:55:04

我正在使用Xcode 7.3和Cocoapods版本的1.0.0.beta.5。我是,而不是使用Cocoapods的最新版本的,因为它在几周前给我使用的其他豆荚带来了许多问题,我不想再更新它,直到我觉得它更加稳定为止。

对我有用的是:

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

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

  1. 保存您的Podfile编辑(如果有的话)
  2. 运行pod install
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36283975

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档