2016-09-23 47 views
2

我最近更新到Xcode中8,我选择留在雨燕2.3领域使用Xcode的8雨燕2.3失败

我使用的CocoaPods集成领域,它是之前升级到Xcode的8

工作

我在Realm的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 

它成功地安装了以下几行信息完成:

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

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

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

您是否尝试过使用桥接头? – cloudcal

+0

@cloudcal不,你会如何推荐使用它?过去我不必使用桥接标头。 – Alan

+0

Realm不需要标头 – SoundShock

回答

1

我有完全相同的问题,解决了这个问题我把我的“用户遗产斯威夫特语言版本”为“YES”该吊舱。 enter image description here

0

我面临同样的问题。我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 

As of v2.4.0, Swift 2.x is no longer supported.境界2.3.0是支持雨燕2.3的最后一个稳定版本。 Soundshock还说,确保RealmSwift Pod Target具有“User Legacy Swift Language version”为“YES”。希望这可以帮助。