2016-11-18 80 views
0

我正在使用Xcode 8.1。我正在嘗試使用Cocoa Pods在我的項目中安裝RealmSwift。可可豆莢版本是1.1.1。不過,我發現了以下錯誤: Unable to find a specification for 'RealmSwift'無法使用可可豆莢裝載RealmSwift

我Podfile的內容給出如下:

platform :ios, '9.0' 

target 'Validator' do 
    # Comment this line if you're not using Swift and don't want to use dynamic frameworks 
    use_frameworks! 
    pod 'RealmSwift' 

end 

    # Pods for Validator 

    target 'ValidatorTests' do 
    inherit! :search_paths 
    # Pods for testing 

    use_frameworks! 
    pod 'RealmSwift' 
    end 

post_install do |installer| 
    installer.pods_project.targets.each do |target| 
     target.build_configurations.each do |config| 
      config.build_settings['SWIFT_VERSION'] = '2.3' # or '3.0' 
     end 
    end 
end 

我在做什麼錯?即使iOS版本更改爲10.0,問題仍然存在。

回答

1

我認爲您的pod回購存在問題。嘗試再次設置:

pod repo remove master 
pod setup 
pod install 
+0

是的,有..謝謝..我使用了以下內容:rm -rf〜/ .cocoapods;莢設置 – StudentX