SwiftyDropbox与Alamofire问题

编程入门 行业动态 更新时间:2024-10-27 16:28:42
本文介绍了SwiftyDropbox与Alamofire问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我的Podfile中包含以下行:

I have the following line in my Podfile:

pod 'Alamofire', '~> 4.7'

问题是当我添加"pod SwiftyDropbox"行时,当我运行pod update时出现问题:

Problem is when I add the line 'pod SwiftyDropbox', there is an issue when I run pod update:

分析依赖性

[!] CocoaPods could not find compatible versions for pod "Alamofire": In Podfile: Alamofire (~> 4.7) SwiftyDropbox was resolved to 2.0.1, which depends on Alamofire (~> 2.0.2)

此外,Alamofire和SwiftyDropbox框架中都存在警告.如何获得最新版本的SwiftyDropbox在XCode 9.3和Swift 4中运行?

Besides there are warnings in both Alamofire as well as SwiftyDropbox framework. How do I get the latest version of SwiftyDropbox to run in XCode 9.3 and Swift 4?

推荐答案

SwiftyDropbox文档中未提及的一些事情,但对于避免/解决此问题至关重要:

A few things that aren't mentioned in the SwiftyDropbox documentation, but which are essential for avoiding/solving this:

  • 您需要在Podfile中指定SwiftyDropbox的版本.像这样:

  • You need to specify the version of SwiftyDropbox in the Podfile. Like this:

pod 'SwiftyDropbox', '~> 5.0.0'

  • 一旦您在Podfile中指定了版本并再次运行 pod install ,就会出现此错误:

    $ pod install Analyzing dependencies [!] CocoaPods could not find compatible versions for pod "SwiftyDropbox": In Podfile: SwiftyDropbox (~> 5.0.0) None of your spec sources contain a spec satisfying the dependency: `SwiftyDropbox (~> 5.0.0)`. You have either: * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`. * mistyped the name or version. * not added the source repo that hosts the Podspec to your Podfile. Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.

  • 如错误消息所述,您需要手动运行 pod repo update .为什么?谁知道,但您需要这样做.

  • As the error message says, you need to manually run pod repo update. Why? Who knows, but you need to do it.

    完成此操作后,它已经获取了SwiftyDropbox的源代码,请运行 pod install ,它将在这次工作.输出将包括"正在安装SwiftyDropbox(5.0.0)".

    Once you've done that, and it has fetched the SwiftyDropbox sources, run pod install and it will work this time. The output will include "Installing SwiftyDropbox (5.0.0)".

  • 更多推荐

    SwiftyDropbox与Alamofire问题

    本文发布于:2023-11-26 06:04:28,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1632931.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:SwiftyDropbox   Alamofire

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!