【问题标题】:Unable to load RealmSwift using Cocoa pods无法使用 Cocoa pod 加载 RealmSwift
【发布时间】:2017-04-02 10:42:15
【问题描述】:

我正在使用 Xcode 8.1。我正在尝试使用 Cocoa Pods 在我的项目中安装 RealmSwift。 Cocoa Pods 版本是 1.1.1。但是,我收到以下错误: Unable to find a specification for '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,问题仍然存在。

【问题讨论】:

    标签: realm cocoapods-1.1.1


    【解决方案1】:

    我认为您的 pod 存储库有问题。尝试重新设置:

    pod repo remove master
    pod setup
    pod install
    

    【讨论】:

    • 是的..谢谢..我使用了以下内容:rm -rf ~/.cocoapods;吊舱设置
    猜你喜欢
    • 2015-09-25
    • 2016-07-13
    • 1970-01-01
    • 1970-01-01
    • 2015-06-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多