1
votes

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

2
You've got a typo in your example. Check my answer here: stackoverflow.com/questions/31334205/…Eric Aya
Thank you. I'll try that.user3163404

2 Answers

4
votes

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.

0
votes

this is how mi CocoaPods file looks and im currently working in swift2.0 in Xcode7 Beta

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

target 'RESTEST' do
pod 'Alamofire', '~> 2.0'
pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git'

I'm using both SwiftyJSON and Alamofire, if you have any trouble using both libraries we are here to help, Greetings