簡體   English   中英

Xcode 7的Alamofire

[英]Alamofire with Xcode 7

我正在使用Xcode 7.0 beta 4(7A165t)。 我想添加Alamofire庫,但是它總是失敗。

我正在使用最新的Cocoapods版本。

我的Podfile是:

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

可以在帶有Swift 2.0的Xcode 7中使用它嗎?

更新

當我跑步時:

pod install

我得到這個:

安裝Alamofire(2.0.0-beta.1)
[!]用Swift編寫的Pod只能集成為框架; 此功能仍處於測試階段。 添加use_frameworks! 到您的Podfile或目標以選擇使用它。 使用的Swift Pod是:Alamofire

執行錯誤消息告訴您的內容並添加use_frameworks! 到您的Podfile。 這是我的一個例子:

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'

對於iOS而不是OS X,請使用platform :ios, '8.0'或等效版本替換platform系列。

這是mi CocoaPods文件的外觀和當前在Xcode7 Beta中的swift2.0中工作的即時消息

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'

我同時使用SwiftyJSON和Alamofire,如果您在使用這兩個庫時都遇到問題,我們可以為您提供幫助,

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM