I want to install AWSAppSync and AWSMobileClient, both of which depend on different versions of the AWSCore. How can I resolve this conflict in the AWSCore version dependency so that I can install both AWSAppSync and AWSMobileClient
I am trying to install the following pods: pod 'AWSAppSync', '~> 2.12.0' pod 'AWSMobileClient', '~> 2.10.0'
However, AWSAppSync depends on AWSCore ~> 2.9.0 whereas, AWSMobileClient depends on AWSCore = 2.10.0. So based on whatever AWSCore version I install, I can install one of the two required pods. I have run the following already:
pod install --repo-update
which didn't not work. I have also tried removing the master repo and running
pod setup
again, but without any luck.
I essentially get the following error when I run pod install
[!] CocoaPods could not find compatible versions for pod "AWSCore":
In snapshot (Podfile.lock):
AWSCore (= 2.9.10, ~> 2.9.0)
In Podfile:
AWSAppSync (~> 2.12.0) was resolved to 2.12.2, which depends on
AWSCore (~> 2.9.0)
AWSMobileClient (~> 2.10.0) was resolved to 2.10.0, which depends on
AWSAuthCore (= 2.10.0) was resolved to 2.10.0, which depends on
AWSCore (= 2.10.0)
I was able to solve this issue by updating by updating AWSAppSync to version 2.14.0 in my Podfile. This is how my Pods look now:
pod 'AWSCore', '~> 2.10.0'
pod 'AWSAppSync', '~> 2.14.0'
pod 'AWSMobileClient', '~> 2.10.0'
pod 'AWSAuthUI', '~> 2.10.0'
pod 'AWSUserPoolsSignIn', '~> 2.10.0'
I found the solution documented on the AWS Amplify docs
If the issue persists after this change, depending on your system, you may need to clear your pods cache and in some cases delete your pod files, re-install them and then do a pod update.
Commands to delete, instal and update pods can be found here - https://gist.github.com/mbinna/4202236
If you are using a version management system, which I recommend, you must run these commands on the correct path
Please reach out if you have any questions about how pods work :)