Description:
Following the Flutter SDK Setup step by step, at step 2.8:
2.8 Open terminal, cd to the /ios directory, and run pod install.
The install fails with the error message
```bash
Analyzing dependencies
Fetching podspec forFlutterfrom.symlinks/flutter/ios-release
Fetching podspec forflutter_secure_storagefrom.symlinks/plugins/flutter_secure_storage/ios
Fetching podspec forimage_cropperfrom.symlinks/plugins/image_cropper/ios
Fetching podspec forimage_pickerfrom.symlinks/plugins/image_picker/ios
Fetching podspec foronesignalfrom.symlinks/plugins/onesignal/ios
Fetching podspec forpath_providerfrom.symlinks/plugins/path_provider/ios
Fetching podspec forshared_preferencesfrom.symlinks/plugins/shared_preferences/ios
Fetching podspec foruni_linksfrom.symlinks/plugins/uni_links/ios
Fetching podspec forurl_launcherfrom.symlinks/plugins/url_launcher/ios
Fetching podspec forvideo_playerfrom.symlinks/plugins/video_player/ios`
[!] CocoaPods could not find compatible versions for pod "OneSignal":
In Podfile:
OneSignal (< 3.0, >= 2.9.3)
onesignal (from `.symlinks/plugins/onesignal/ios`) was resolved to 1.0.5, which depends on
OneSignal (< 3.0, >= 2.9.5)
Specs satisfying the OneSignal (< 3.0, >= 2.9.3), OneSignal (< 3.0, >= 2.9.5) dependency were found, but they required a higher minimum deployment target.
[!] Automatically assigning platform ios with version 8.0 on target Runner because no platform was specified. Please specify a platform for this target in your Podfile. See https://guides.cocoapods.org/syntax/podfile.html#platform.
[!] Automatically assigning platform ios with version 10.2 on target OneSignalNotificationServiceExtension because no platform was specified. Please specify a platform for this target in your Podfile. See https://guides.cocoapods.org/syntax/podfile.html#platform.
````
Environment
Fixed by running
bash
pod repo update
Hope this helps someone else!
Thank you :)
@lifenautjoe I would like to thank you ~
How can i run pod repo update on codeMagic if anyone knows?
Sometimes run
pod repo update
pod install
is not enough.
This was my error after updated OneSingal SDK on pubspec.yaml from onesignal_flutter: ^2.0.0 to onesignal_flutter: ^2.1.0:
[!] CocoaPods could not find compatible versions for pod "OneSignal":
In snapshot (Podfile.lock):
OneSignal (< 3.0, = 2.10.1, >= 2.9.3)
In Podfile:
OneSignal (< 3.0, >= 2.9.3)
onesignal_flutter (from `.symlinks/plugins/onesignal_flutter/ios`) was resolved to 2.1.0, which depends on
OneSignal (= 2.11.0)
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* changed the constraints of dependency `OneSignal` inside your development pod `onesignal_flutter`.
You should run `pod update OneSignal` to apply changes you've made.
This is the workaround I used to solve the problem:
cd ios/
pod repo update
rm -rf Podfile.lock Pods
pod install
Most helpful comment
Fixed by running
bash pod repo updateHope this helps someone else!