Search code examples
cocoapodsswift2alamofirexcode7-beta4

Alamofire with Xcode 7


I'm using Xcode 7.0 beta 4 (7A165t). I want to add the Alamofire library but it's always failing.

I am using the last Cocoapods version.

My Podfile is:

pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :branch => 'swift-2.0'

Is it possible to use it in Xcode 7 with Swift 2.0?

UPDATE

When I run:

pod install

I get this:

Installing Alamofire (2.0.0-beta.1)
[!] Pods written in Swift can only be integrated as frameworks; this feature is still in beta. Add use_frameworks! to your Podfile or target to opt into using it. The Swift Pod being used is: Alamofire


Solution

  • Do what the error message tells you to and add use_frameworks! to your Podfile. Here's mine as an example:

    source 'https://github.com/CocoaPods/Specs.git'
    platform :osx, '10.10'
    use_frameworks!
    pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :branch => 'swift-2.0'
    

    For iOS instead of OS X, replace the platform line with platform :ios, '8.0' or equivalent.