2016-11-07 14 views
10

私のプロジェクトは現在、Alamofire 4.0でXcode 8とSwift 3に組み込まれています。私はCocoaPodsを使ってAlamofireを実装しています。Alamofire 4.0とiOS 10とSwift 3でGoogle Places APIを使用

次のように私の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)` 

GoogleはAlamofireの以前のバージョン(3.4と作品を配置します.0)しかし、私はそれを4.0.0 + .Am私はここで何か間違っていると働いて得ることができますか?他の誰かが同じ問題を抱えているか/修正を見つけましたか?

UPDATE:私はまだ運クリーンポッドは

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. 
+1

私は新しいプロジェクトにあなたのpodfileをコピーし、同じ結果を見ていないよ、とGooglePlaces 2.1.0を安全にインストールされます。多分、きれいなポッドをインストールしようとしますか? 'rm -Rf Pods;ポッドインストール ' – emb

+1

didnt work。私はちょうど新しいプロジェクトを作成し、同じことを試みましたが、同じエラーが発生しています。それは私のココアポッドのバージョンかもしれませんか?私はcocoapods 1.1.1をエルキャピタンで実行しています10.11.5 –

+1

非常に奇妙です。私はcocoapods 1.1.1とEl Capitan 10.11.6と非常によく似た設定をしています。あなたが 'rm -Rf Pods 'の後にcocoapodsのプリントをターミナルに投稿することができますか?ポッドインストール '?それが間違ってしまう前にどれくらいの距離にあるのかを知りたい。 – emb

答えて

6

をインストールした後は、お使いのポッドファイルでGoogle Places 2に*のバージョンを変更するべきではありませんしている 、この依存性はAlamofire 4.0が必要です。

GoogleプレイスポッドV2 *:。https://cocoapods.org/?q=googleplaces

2

あなたはそれが正しいポッドを持っていないが、それはまだ最初old GooglePlacesAPI PodをフェッチPodFileインサイド

pod 'GooglePlaces' 

を書くときに実際に問題があります端末にpod search GooglePlacesと入力するだけで、多くの結果が取得されます。最初に一致する必要があるのはTHE OLD PODになりますので、y私たちのポッドリポジトリ

pod update 

そして、あなたがターミナルでなく、アクティビティモニタの変更を見ていなくても、それが終了するまでに時間がかかる - >ネットワークあなたはそれだけで更新を終了し、その後になるまで我慢してそれを監視することができますターミナルのGooglePlacesを再入力して新しいものにしてから実行してください。

pod install 

もう一度やりたい!

は*ここであなたが見てみる必要がある場合には、私のPodfileです:

source 'https://github.com/CocoaPods/Specs.git' 
platform :ios, '10.0' 
use_frameworks! 
target 'YOUR-PROJECT' do 
pod 'GoogleMaps', '= 2.1.1' 
pod 'GooglePlaces', '= 2.1.1' 
pod 'Alamofire', 
:git => 'https://github.com/Alamofire/Alamofire.git', 
:branch => 'master' 
end 
関連する問題