1. Mô tả lỗi
Khi chạy lệnh install platform iso thì xuất hiện lỗi như sau:
1 2 3 4 5 |
[!] CocoaPods could not find compatible versions for pod "GoogleMaps": In Podfile: GoogleMaps (~> 2.7.0) Specs satisfying the `GoogleMaps (~> 2.7.0)` dependency were found, but they required a higher minimum deployment target. |
2. Cách khắc phục
Để khắc phục lỗi này, chúng ta mở file platforms/ios/Podfile lên bạn sẽ thấy nội dung có dạng như sau:
1 2 3 4 |
platform :ios, '7.0' target 'Public Cao Lanh City' do pod 'GoogleMaps', '~> 2.7.0' end |
Tiếp theo, chúng ta đặt lại phiên bản ios là 9.0 như nội dung dưới đây:
1 2 3 4 |
platform :ios, '9.0' target 'Public Cao Lanh City' do pod 'GoogleMaps', '~> 2.7.0' end |
Sau đó, lưu file Podfile lại.
3. Kiểm tra kết quả
Để kiểm tra kết quả có tương thích không chúng ta thực hiện 2 lệnh sau:
– Lệnh thứ nhất: pod install
Nếu lệnh chạy xong cho kết quả có dạng như dưới đây là thành công!
1 2 3 4 5 6 |
Analyzing dependencies Downloading dependencies Installing GoogleMaps (2.7.0) Generating Pods project Integrating client project Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed. |
– Lệnh thứ hai: pod update
Nếu lệnh chạy xong cho kết quả có dạng như dưới đây là thành công!
1 2 3 4 5 6 7 |
Update all pods Updating local specs repositories Analyzing dependencies Downloading dependencies Generating Pods project Integrating client project Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed. |
Hy vọng hữu ích với các bạn!
Nosomovo