Search code examples
iosalamofire

is Alamofire compatible for iOS 11.0?


I am using this in my podfile

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'MediaUploader' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for MediaUploader
  pod 'SwiftyJSON', '~> 4.0'
  pod 'Alamofire', '~> 5.2'

end

if I read the documentation from Alamofire github in here. it is said that the requirement for alamofire are

  1. iOS 10.0+ / macOS 10.12+ / tvOS 10.0+ / watchOS 3.0+
  2. Xcode 11+
  3. Swift 5.1+

but when I set the deployment for iOS 11.0 like this

enter image description here

I have error like this

enter image description here

it seems the minimum requirements is for iOS 12.0. am I do something wrong? can I use Alamofire for iOS 11.0 ?


Solution

  • Alamofire 5 is perfectly compatible with iOS 11.

    Cocoapods doesn't take into account your projects minimum deployment target. (apparently iOS 12 is the default)

    You just need to uncomment this line in your Podfile:

    # platform :ios, '9.0'
    

    set the correct minimum deployment version:

    platform :ios, '11.0'
    

    and run pod install again.