2015-09-07 37 views
3

我试着安装swift 2.0的领域,但显示错误。 请告诉我如何解决这个问题。 我已经完成了“sudo gem update cocoa pod”和“sudo gem install cocoapods --pre”。如何解决安装Realm for swift 2.0的错误?

/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__" 
# ------------------------------------------- 

回答

4

它看起来像你需要更新到CocoaPods 0.38.3。

+0

非常感谢你! 我已经成功。 –