[問題] 新手請問一下

作者: slacash (cash)   2016-01-19 21:25:01
剛學習Swift不好意思請教一下各位
若是用CocoaPods ,想使用objective-c 的第三方套件
譬如用AFNetworking
我有在我的Podfile 中
加入 'AFNetworking' 並且執行完pod install
之後用 xcworkspace 開起project
然後在我的controller中 import AFNetworking
可是仍無法使用
請問我的流程有少了什麼步驟嗎
麻煩各位了
作者: johnlinvc (阿翔)   2016-01-19 21:53:00
有什麼錯誤訊息呢? 大家沒辦法通靈
作者: slacash (cash)   2016-01-19 22:10:00
我加了let manager = AFHTTPRequestOperationManager()錯誤訊息是 use of unresolved identifer 'AFHTTPRequs..是沒import AFNetworking到我的project的關系嗎
作者: songooo (songooo)   2016-01-19 22:19:00
試試改用2.6.3版的AFNetworking?
作者: neotek   2016-01-19 22:24:00
不是有AlmoFire?*Alamofirehttps://github.com/Alamofire/Alamofire
作者: slacash (cash)   2016-01-19 22:50:00
改用2.6.3是在Podfile改成pod 'AFNetworking', '2.6.3'嗎再請問一下怎麼看目前套件的版本neotek大 所以用swift開發的話只能用swift的套件嗎
作者: m20021991y (Eddie)   2016-01-19 23:00:00
貼一下 Podfile 吧
作者: slacash (cash)   2016-01-19 23:07:00
platform :ios, '8.0'use_frameworks!target 'TestLibrary' dopod 'AFNetworking'end只有這樣而已
作者: cryinglove (毓™)   2016-01-19 23:55:00
swift 用 OC 要有橋接文件
作者: kokuyoku (天龍狂想曲)   2016-01-20 01:06:00
有用use_frameworks!就不用橋接文件直接用NSURLSession應該就不用AFNetworking
作者: uranusjr (←這人是超級笨蛋)   2016-01-20 02:42:00
初學 Swift 就用 Alamofire 就好了啦, 別搞那麼多

Links booklink

Contact Us: admin [ a t ] ucptt.com