swift - 在 alamofire 4.0 和 iOS 10 Swift 中使用 Google Map Directions API

标签 swift alamofire ios10

我的项目目前是在 xcode 8/swift 3 和 alamofire 4.0 中构建的。

我的播客文件如下:

# Uncomment the next line to define a global platform for your project
platform :ios, '10.0'
use_frameworks!

target 'CustomerApp' do

# Pods for CustomerApp
pod 'SwiftyJSON'
pod 'GoogleMaps'
pod 'GooglePlaces'
pod 'GoogleMapsDirections', '~>1.0.4'
pod 'Alamofire', '~>4.0'

end

我在尝试安装 googleMapDirection pod 时在终端中收到以下错误:

]无法满足以下要求:

  • Alamofire (~> 4.0) Podfile 需要
  • Alamofire (= 4.2.0) Podfile.lock 需要
  • Alamofire (~> 3.0) GoogleMapsDirections (1.0.4) 需要

找到了满足 Alamofire (~> 4.0)、Alamofire (= 4.2.0)、Alamofire (~> 3.0) 依赖项的规范,但它们需要更高的最低部署目标。

Google Map Directions 适用于以前版本的 Alamofire (3.5),但我无法使用 4.0。我在这里做错了什么吗?还有其他人遇到同样的问题/找到解决办法了吗?

最佳答案

已解决:

我已将我的 pod 文件中的 GoogleMapDirections 版本更改为 1.1,这需要最新的 Alamofire v4.0 依赖项。

enter image description here

关于swift - 在 alamofire 4.0 和 iOS 10 Swift 中使用 Google Map Directions API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41244771/

相关文章:

ios - RxAlamofire - 下载完成事件丢失

swift - Iphone 7 和 iOS 10.1.1 上的谷歌地图无法正常工作

ios - Xcode 8 导入 StoreKit.framework 在归档时导致错误

ios - 自动闭包的函数是异步的吗?

swift - 无法使文本框或UIPickerView在UIView容器 View 中进行交互

ios - 有什么方法可以在图形库中使用真实对象来获取核心数据

ios - 在核心数据中,建立一对一的关系是一个好的实践吗?

swift - 使用 alamofire multipart 上传图像数组

swift - 阿拉莫菲尔后下一个瓦尔

ios - dyld 未找到 AVAssetDownladTask