将Google Places API与Alamofire 4.0和iOS 10以及Swift 3配合使用

Mat*_*eth 11 ios google-places-api cocoapods swift alamofire

我的项目目前在Xcode 8和Swift 3中使用Alamofire 4.0构建.我使用CocoaPods来实现Alamofire.

我的podfile如下:

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

target 'WTB’ do
# Comment the next line if you're not using Swift and don't want to use        dynamic frameworks
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :tag => ’4.0.0’


pod 'SwiftyJSON', git: 'https://github.com/BaiduHiDeviOS/SwiftyJSON.git',     branch: 'swift3'

pod 'GooglePlaces'    #doesn't work when this line is added
pod 'ChameleonFramework'
end        
Run Code Online (Sandbox Code Playgroud)

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

- `Alamofire (from `https://github.com/Alamofire/Alamofire.git`, tag    `4.0.0`)` required by `Podfile`
- `Alamofire (= 4.0.0)` required by `Podfile.lock`
- `Alamofire (~> 3.0)` required by `GooglePlaces (1.0.1)`
Run Code Online (Sandbox Code Playgroud)

Google可以使用以前版本的Alamofire(3.4.0),但我无法使用4.0.0 +.我在这里做错了什么?是其他人有同样的问题/找到修复?

更新:干净的pod安装后我仍然没有运气

Matthews-MBP:WTB matthewwyeth$ rm -Rf Pods; pod install
Analyzing dependencies
Pre-downloading: `Alamofire` from    `https://github.com/Alamofire/Alamofire.git`, tag `4.0.0`
Pre-downloading: `SwiftyJSON` from    `https://github.com/BaiduHiDeviOS/SwiftyJSON.git`, commit     `de5dc3b1b421805769590d331178551bbb0e5733`
[!] Unable to satisfy the following requirements:

- `Alamofire (from `https://github.com/Alamofire/Alamofire.git`, tag   `4.0.0`)` required by `Podfile`
- `Alamofire (= 4.0.0)` required by `Podfile.lock`
- `Alamofire (~> 3.0)` required by `GooglePlaces (1.0.1)`

[!] Your Podfile has had smart quotes sanitised. To avoid issues in the            future, you should not use TextEdit for editing it. If you are not using            TextEdit, you should turn off smart quotes in your editor of choice.
Run Code Online (Sandbox Code Playgroud)

Asi*_*han 6

您应该Google Places在pod文件中将版本更改为2.*,此依赖项需要Alamofire 4.0.

Google商家信息pod v2.*:https://cocoapods.org/?q = googleplaces