Dự án của tôi hiện được xây dựng trong Xcode 8 và trong Swift 3 với Alamofire 4.0. Tôi sử dụng CocoaPods để triển khai Alamofire.Sử dụng API Google Địa điểm với Alamofire 4.0 và iOS 10 và Swift 3
podfile của tôi là như sau:
# 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
tôi nhận được lỗi sau đây trong các thiết bị đầu cuối khi cố gắng cài đặt 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)`
nơi Google làm việc với các phiên bản trước của Alamofire (3.4 .0) nhưng tôi không thể làm cho nó làm việc với 4.0.0 +. Tôi có làm gì sai ở đây? có ai khác có cùng vấn đề/tìm thấy bản sửa lỗi không?
UPDATE: tôi đã vẫn không có may mắn sau pod sạch cài đặt
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.
Tôi không nhìn thấy kết quả tương tự sao chép podfile của bạn vào một dự án mới, và GooglePlaces 2.1.0 được cài đặt một cách an toàn. Có thể thử cài đặt vỏ sạch? 'rm -Rf Pods; pod install' – emb
không hoạt động. tôi vừa tạo ra một dự án mới và cố gắng như vậy nhưng vẫn gặp lỗi tương tự. nó có thể là phiên bản cocoapod của tôi không? im chạy cocoapods 1.1.1 trên El Capitan 10.11.5 –
Rất lạ. Tôi đã có một thiết lập rất giống với cocoapods 1.1.1 và El Capitan 10.11.6. Có thể bạn có thể đăng tất cả mọi thứ cocoapods in vào Terminal sau khi bạn 'rm -Rf Pods; pod install'? Tò mò để xem nó được bao xa trước khi nó hoạt động sai. – emb