首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用xCode 8的领域&SWIFT2.3失败

使用xCode 8的领域&SWIFT2.3失败
EN

Stack Overflow用户
提问于 2016-09-23 14:36:53
回答 2查看 632关注 0票数 2

我最近更新了xCode 8,我选择和SWIFT2.3待在一起

我正在使用Cocoapods来集成领域,它在升级到xCode 8之前就已经开始工作了。

我搜索了领域的GitHub,并尝试了一些解决方案,但没有成功。在我的podfile中,我有以下几行用于领域的内容

代码语言:javascript
复制
pod 'Realm', git: 'https://github.com/realm/realm-cocoa.git', branch: 'master', submodules: true
pod 'RealmSwift', git: 'https://github.com/realm/realm-cocoa.git', branch: 'master', submodules: true

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['SWIFT_VERSION'] = '2.3'
    end
  end
end

它成功地安装了以下消息:

使用RealmSwift (1.1.0)使用领域(1.1.0)

当我重新启动应用程序时:

  • 68次RLM*文件丢失警告
  • 误差- Umbrella header 'Realm.h not found
  • 误差- Cound not build Objective-C module Realm
EN

回答 2

Stack Overflow用户

发布于 2016-09-26 15:29:53

我也有过同样的问题,并解决了我把我的“用户遗产斯威夫特语言版本”写成“是”的问题。

票数 1
EN

Stack Overflow用户

发布于 2017-03-02 20:58:21

我也面临着同样的问题。我的Podfile看起来和你的类似,但我有这样的编辑:

代码语言:javascript
复制
pod 'Realm', git: 'https://github.com/realm/realm-cocoa.git', branch: 'master', submodules: true
pod 'RealmSwift', '~> 2.3.0'

post_install do |installer|
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
    config.build_settings['SWIFT_VERSION'] = '2.3'
   end
  end
end

在2.4.0版本中,SWIFT2.x不再受支持。领域2.3.0是支持SWIFT2.3的最后一个稳定版本。同样,正如Sound休克所说,确保你有“用户遗产,斯威夫特语言版本”到“是”的RealmSwift Pod。希望这能有所帮助。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39663465

复制
相关文章

相似问题

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