I want to add Alamofire V4 in my swift 3 project. I want to add it manully , like I do with other normal library ,simply add their source code in my project. How to maually add Alamofire , manually , I dont want to add it as framwork/target dependency.
Asked
Active
Viewed 562 times
0
-
can you tried with this answer https://stackoverflow.com/questions/31706589/cannot-add-alamofire-to-swift-project – BHAVIK Nov 03 '17 at 04:43
2 Answers
0
You can easily integrate with POD as well.
and simple code to call API and handle response.
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
self.API_Formation_Function("email@email.com", password: "password12345")
}
func API_Formation_Function(_ userName : String , password : String) {
EMReqeustManager.sharedInstance.apiLogin(userName, password: password) {
(feedResponse) -> Void in
// Show your progress HUD here
if let downloadError = feedResponse.error{
// Hide progress HUD here and show error if comes
} else {
if let dictionary = feedResponse.responseDict as? Dictionary<String, AnyObject>{
// Hide progress HUD here and show response
let responseModel = EMResponseModel.init(jsonDict: dictionary)
print(responseModel)
}
}
}
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}

Hasya
- 9,792
- 4
- 31
- 46
0
Is there a specific reason why you don't want to do it automatically with CocoaPods? Don't let setting up CocoaPods turn you off to the idea. Once you get it installed, its wonderful for updating and managing your addons. here is a GREAT video tutorial on how to install CocoaPods.
https://www.youtube.com/watch?v=iEAjvNRdZa0&t=2s
Do yourself a favor and take the time to install.

Spartakus
- 69
- 1
- 10