gpt4 book ai didi

ios - 使用 xCode 8 和 Swift 2.3 的 Realm 失败

转载 作者:可可西里 更新时间:2023-11-01 02:14:16 26 4
gpt4 key购买 nike

我最近更新到 xCode 8,我选择继续使用 Swift 2.3

我正在使用 Cocoapods 来集成 Realm,它在升级到 xCode 8 之前就可以正常工作。

我在 Realm 的 GitHub 上四处搜索并尝试了一些解决方案,但没有成功。在我的 podfile 中,我有以下 Realm 行

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

安装成功完成并显示消息:

Using Realm (1.1.0) Using RealmSwift (1.1.0)

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

  • 68 条丢失文件警告 RLM* 文件
  • 错误 - Umbrella header 'Realm.h not found
  • 错误 - 无法构建 Objective-C 模块 Realm

最佳答案

我遇到了完全相同的问题,并通过将我的“用户旧版 Swift 语言版本”设置为该 Pod 的"is"来解决它。 enter image description here

关于ios - 使用 xCode 8 和 Swift 2.3 的 Realm 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39663465/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com