我的項目目前使用Xcode 8和Swift 3使用Alamofire 4.0。我使用CocoaPods來實現Alamofire。使用Google Places API與Alamofire 4.0和iOS 10和Swift 3
我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
嘗試安裝googlePlaces莢,當我在終端以下錯誤:
- `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)`
谷歌的地方工作與Alamofire以前的版本(3.4 .0)但我無法使用4.0.0 + .Am我在這裏做錯了什麼?是否有其他人有相同的問題/找到解決辦法?
更新: 我也還算乾淨莢後沒有運氣安裝
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.
我沒有看到複製你的podfile進入一個新的項目相同的結果,並GooglePlaces 2.1.0被安全地安裝。也許嘗試一個乾淨的莢安裝? 'rm -Rf Pods;莢安裝' – emb
沒有工作。我剛剛創建了一個新項目並嘗試相同,但仍然得到相同的錯誤。它可以是我的cocoapods版本嗎?即時通訊運行cocoapods 1.1.1在埃爾卡皮坦10.11.5 –
很奇怪。我有一個非常類似的設置與cocoapods 1.1.1和埃爾卡皮坦10.11.6。你可能會在rm -Rf Pods之後將所有的cocoapods打印到終端上;吊艙安裝「?很想看看它在行爲不當之前得到了多少。 – emb