我最近更新了xCode 8,我选择和SWIFT2.3待在一起
我正在使用Cocoapods来集成领域,它在升级到xCode 8之前就已经开始工作了。
我搜索了领域的GitHub,并尝试了一些解决方案,但没有成功。在我的podfile中,我有以下几行用于领域的内容
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)
当我重新启动应用程序时:
RLM*文件丢失警告Umbrella header 'Realm.h not foundCound not build Objective-C module Realm发布于 2016-09-26 15:29:53
我也有过同样的问题,并解决了我把我的“用户遗产斯威夫特语言版本”写成“是”的问题。

发布于 2017-03-02 20:58:21
我也面临着同样的问题。我的Podfile看起来和你的类似,但我有这样的编辑:
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。希望这能有所帮助。
https://stackoverflow.com/questions/39663465
复制相似问题