I am trying to install AWSAppSync
and AWSMobileClient
to my ios app.
When I want to use pod install.
I have tried to use only AWSAppSync or AWSMobileClient. They are fine when used alone but they don't work in the same pod file. I also tried different version of AWSAppSync and AWSCore. AWSCore 2.7.0 or 2.8.0 doesn't make difference in this case. Different version of AWSAppSync return the same error.
#installed
#pod 'AWSCore', '~> 2.8.0'
pod 'AWSAppSync', '~> 2.6.24'
pod 'AWSMobileClient', '~> 2.8.0'
pod 'AWSAuthUI', '~> 2.8.0'
pod 'AWSUserPoolsSignIn', '~> 2.8.0'
This is what's returned:
[!] CocoaPods could not find compatible versions for pod "AWSCore":
In snapshot (Podfile.lock):
AWSCore (= 2.7.4, ~> 2.7.0)
In Podfile:
AWSAppSync (~> 2.6.24) was resolved to 2.6.25, which depends on
AWSCore (~> 2.7.0)
AWSMobileClient (~> 2.8.0) was resolved to 2.8.0, which depends on
AWSAuthCore (= 2.8.0) was resolved to 2.8.0, which depends on
AWSCore (= 2.8.0)
Generally speaking, it's necessary to use compatible versions of the AWSAppSync and AWSiOSSDK (which provides AWSCore, AWSMobileClient, etc). The best way to do that is to let the resolved dependencies flow from the version of AWSAppSync you want to use. For example, if you are using AppSync 2.6.24, then you should be using
~> 2.6.0
versions of the dependent libraries. Since it looks like you want to use AWSMobileClient for auth, you'll need to upgrade AWSAppSync to a newer version.Do you still encounter the problem using the latest AWSAppSync version (2.8.0)? I've successfully used that with the latest AWSMobileClient (2.8.1). And just to be sure, are you issuing a
pod repo update
before thepod install
, or invokingpod install --repo-update
to ensure the Spec repo is up to date? Here's a configuration I'm using successfully in an app that uses AWSAppSync:Which resolves to the following (taken from Podfile.lock):