0

I want to use Alamofire in my project

I have tried to install Podfile but confused Alamofire version to install. when I try to install pod 'Alamofire', '~> 5.0.0-beta.5' I'm getting this error

CocoaPods could not find compatible versions for pod "Alamofire": In Podfile: Alamofire (~> 5.0.0-beta.5)

know I have installed pod 'Alamofire', '~> 4.7.3' but when I try to import in my ViewController.swift file getting the error No such module Alamofire

Ravi B
  • 1,574
  • 2
  • 14
  • 31
Abdulkadir Ugas
  • 415
  • 5
  • 13
  • What's your project deployment target. – A.Munzer Jul 08 '19 at 08:05
  • It's not necessarily to specify exact version of the pod, you can just write `pod 'Alamofire'`, before import in your `ViewController` you should build your project, if build doesn't help you, try to reopen your project, hope it will help you. – Andrew Jul 08 '19 at 08:09
  • @A.Munzer it's 10.0 – Abdulkadir Ugas Jul 08 '19 at 08:31
  • check this link for answer this will help you https://stackoverflow.com/questions/55912541/why-do-i-keep-getting-the-error-no-such-module-realmswift/55915886#55915886 – Ali Xhah Jul 08 '19 at 13:35

1 Answers1

2

Given the more recent podspec for Alamofire 5.0.0 beta (just here), your project must fill this requirements:

s.swift_version = '5.0'

and

s.ios.deployment_target = '10.0' (i suppose you're developing for iOS)

a Podfile with single line:

'Alamofire', '~> 5.0.0-beta.6'

is working on me

jlngdt
  • 1,350
  • 9
  • 14