如何解决安装Realm for swift 2.0的错误?

时间:2015-09-07 04:34:16

标签: ios cocoapods swift2 realm

我尝试为swift 2.0安装realm,但显示错误。 请告诉我如何解决这个问题。 我已经完成了“sudo gem update cocoa pods”和“sudo gem install cocoapods --pre”。

/Users/*******/App/BandApp% pod --version
0.36.4
/Users/*******/App/BandApp% cat Podfile
use_frameworks!
pod 'Realm', :git => 'https://github.com/realm/realm-cocoa.git', :branch => 'swift-2.0'
pod 'RealmSwift', :git => 'https://github.com/realm/realm-cocoa.git', :branch => 'swift-2.0'
/Users/*******/App/BandApp% pod install 
Analyzing dependencies

CocoaPods 0.39.0.beta.4 is available.
To update use: `gem install cocoapods --pre`
[!] This is a test version we'd love you to try.

For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.

Pre-downloading: `Realm` from `https://github.com/realm/realm-cocoa.git`, branch `swift-2.0`

[!] Invalid `Realm.podspec` file: undefined method `module_map=' for #<Pod::Specification name="Realm">. Updating CocoaPods might fix the issue.

 #  from /Users/*******/BandApp/Pods/Realm/Realm.podspec:38
 #  -------------------------------------------
 #  
 >    s.module_map              = 'Realm/module.modulemap'
 #    s.compiler_flags          = "-DREALM_HAVE_CONFIG -DREALM_COCOA_VERSION='@\"#{s.version}\"' -D__ASSERTMACROS__"
 #  -------------------------------------------

1 个答案:

答案 0 :(得分:4)

您似乎需要更新到CocoaPods 0.38.3。