CocoaPods could not find compatible versions for pod "AFNetworking":

Viewed 820

I would like to update my AFNetworking to version pod 'AFNetworking', '~> 4.0', but I am getting the following error.

[!] CocoaPods could not find compatible versions for pod "AFNetworking":
  In Podfile:
    AFNetworking (~> 4.0)

    AFOAuth2Manager was resolved to 2.0.0, which depends on
      AFNetworking (~> 2.2)

CocoaPods could not find compatible versions for pod "AFNetworking/NSURLConnection":
  In Podfile:
    AFOAuth2Manager was resolved to 2.2.0, which depends on
      AFNetworking/NSURLConnection (~> 2.2)

None of your spec sources contain a spec satisfying the dependency: `AFNetworking/NSURLConnection (~> 2.2)`.

I am using pod version 1.8.4 and macOS 10.15.3 with xcode11.3.1. Could you please help me on how to solve the issue

2 Answers

Had a similar problem, changing to

pod 'AFNetworking', '~> 4.0.1'

and removing an outdated dependency

# pod 'AFNetworking+RetryPolicy', '~>1.0.3'

was sufficient to solve this

Related