網上關于Carthage安裝相關的內容還是挺多的,本文不做贅述。具體安裝及使用可參考這篇博文<a href="http://www.lxweimin.com/p/5ccde5f22a17"><如何使用Carthage管理iOS依賴庫></a>。
將打包好的Alamofire.framework導入到工程中
1
2
運行程序,結果控制臺輸出報錯
dyld: Library not loaded: @rpath/Alamofire.framework/Alamofire
Referenced from: /Users/userName/Library/Developer/CoreSimulator/Devices/41BDA638-6256-4005-BA3F-32BF7BF729B6/data/Containers/Bundle/Application/CC0954BA-6D09-4990-BB06-B57758C579EF/SwiftLearn2.app/SwiftLearn2
Reason: image not found
解決方法:
在Embedded Binaries 導入Alamofire.framework即可
3
4
5
希望對遇到同樣問題的同學有幫助。