Alamofire: Where is 4.0.0-beta.1?

Created on 27 Aug 2016  ·  29Comments  ·  Source: Alamofire/Alamofire

I’m trying to install AlamofireImage swift3 branch via CocoaPods. It depends on Alamofire 4.0.0-beta.1, but I can’t find 4.0.0-beta.1 anywhere. Did you remove the tag?

My Podfile:

target ‘MyProject’ do
  use_frameworks!
  pod 'AlamofireImage', :git => 'https://github.com/Alamofire/AlamofireImage.git', :branch => 'swift3'
end

Error message from CocoaPods:

[!] Unable to satisfy the following requirements:

- `Alamofire (= 4.0.0-beta.1)` required by `AlamofireImage (3.0.0-beta.1)`

None of your spec sources contain a spec satisfying the dependency: `Alamofire (= 4.0.0-beta.1)`.
cocoapods question

All 29 comments

I have the same issue... Should we solve it by specifying the swift3 branch, instead of a tag?

Not really.

Use that:

target 'Project' do
    pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :branch => 'swift3'
    pod 'AlamofireImage', :git => 'https://github.com/Alamofire/AlamofireImage.git', :branch => 'swift3'
end

Then pod update or pod update Alamofire. It's works well.

Learn more. AlamofireImage#153

Thanks @MainasuK. 🍻

We'll be cutting the beta.1 releases shortly once we get the AFError PR through. Until then, you can use @MainasuK's solution. You could also point to a specific commit hash on the swift3 branch rather than the swift3 branch itself in the Podfile to save yourself from a future breaking update.

Cheers. 🍻

@MainasuK hehe yeah exactly what I wrote... specifying branch, not "~> 4.X.Y..."

It happened to me too - locally i was able to get it to build by removing the Manager.swift file. Looking at previous commits it looks like this got added accidentally

The Alamofire.Manager class has been renamed SessionManager @edwardvalentini

exactly. so why was it added back into the repo in this commit e1cc66446c635cb593eaf4f7635d64242cf5a9e9 ?

@edwardvalentini good question! As @cnoon proposed, maybe we should specify a commit rather than branch. Try 3cc5b4e, it worked for me

Pointing Alamofire and AlamofireImage both to the swift3 won't work at the moment because AlamofireImage's podspec file requires Alamofire (= 4.0.0-beta.1). Are there plans to push one of these betas to Cocoapods trunk soon, or is there any other workaround? :)

@JaviSoto AFI hasn't been fully updated for 4.0.0-beta.2, so you'll need to lock your Podfile to the last compatible commit.

I couldn't find any commit that both:

  • Compiles under Swift 2
  • Targets a correct version of Alamofire to satisfy the Cocoapods dependency resolver.

:(

Anyone found any way to resolve or workaround this yet? Following errors received when targeting Alamofire and AlamofireImage swift3 branches.

[!] Unable to satisfy the following requirements:

I moved over to Carthage as a work-around for the time being:

github "Alamofire/Alamofire" "swift3"
github "Alamofire/AlamofireImage" "swift3"

+1

I have the same issue here and I'm so lazy to move all my project to Carthage 😅 It would be great resolve that dependency. Thanks!

Anyone found a non carthage workaround? GM dropped today so if ever there is a time?...

@danielgalasko this works for me:

pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :commit => '3cc5b4e'

but hmm was a couple of days ago since I ran pod install

Perfect, that got it. Thanks @Sajjon

pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire', :commit => '3cc5b4e'
pod 'AlamofireImage', :git => 'https://github.com/Alamofire/AlamofireImage', :branch => 'swift3'

@danielgalasko I can't get Alamofire to compile using this commit...

@KelvinJin commit 418b0fc is ok for me.

@bizhara For me, the issue is that I'm also using AlamofireImage at branch swift3 which requires 4.0.0-beta.1 Alamofire. And that will conflict with 418b0fc.

Updated:

Using the pull request solved my problem!

@KelvinJin How were you able to reference the pull request in your Podfile?

I've tried referencing the latest commit SHA from the pull request:

pod 'Alamofire',
  git: 'https://github.com/Alamofire/Alamofire.git'

pod 'AlamofireImage',
  git: 'https://github.com/Alamofire/AlamofireImage.git',
  commit: '0469d9ebab544478ba6644a9881aba3833ce1a'

but this is the error I get:

Analyzing dependencies
Pre-downloading: `Alamofire` from `https://github.com/Alamofire/Alamofire.git`
Pre-downloading: `AlamofireImage` from `https://github.com/Alamofire/AlamofireImage.git`, commit `0469d9ebab544478ba6644a9881aba3833ce1a`

[!] Error installing AlamofireImage
[!] /usr/local/bin/git checkout --quiet 0469d9ebab544478ba6644a9881aba3833ce1a

error: pathspec '0469d9ebab544478ba6644a9881aba3833ce1a' did not match any file(s) known to git.

@adimitri not sure you can use that syntax (maybe I am wrong...), but I use this syntax:

pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire', :commit => '3cc5b4e'

Until the cocoapods spec gets updated, I've managed to get pod install to work with:

pod 'Alamofire',
  :git => 'https://github.com/Alamofire/Alamofire',
  :commit => '76558cf44275cc6a6b9ebee9e3ac53b281d504b2'
pod 'AlamofireImage', :git => 'https://github.com/Alamofire/AlamofireImage.git'

I guess all is in flux these days with developers catching up with Swift 3 and the new Xcode release, so this will probably be outdated pretty quickly.

pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire', :commit => '4.0.0'
pod 'AlamofireImage', :git => 'https://github.com/Alamofire/AlamofireImage'

This worked for me.

This was likely just a vestige of issues of getting ready to launch the new versions.

This works:

pod 'Alamofire', '~> 4.0.0'
pod 'AlamofireImage', '~> 3.0.0'

Oh, i couldn't get that to work for me just now, but I will try it again.

I get this error when doing it that way

- `Alamofire (~> 4.0.0)` required by `Podfile`
None of your spec sources contain a spec satisfying the dependency: `Alamofire (~> 4.0.0)`.

You might need to run the following command in your terminal first:

$ pod repo update
Was this page helpful?
0 / 5 - 0 ratings