Ich möchte Alamofire V4 in meinem Projekt swift 3 hinzufügen. Ich möchte es manuell hinzufügen, wie ich es mit anderen normalen Bibliotheken mache, füge einfach ihren Quellcode in mein Projekt ein. Wie Alamofire manuell hinzufügen, ich möchte es nicht als Framwork/Zielabhängigkeit hinzufügen.Manuelles Hinzufügen von Alamofire mit swift 3
0
A
Antwort
0
Sie können auch problemlos mit POD integrieren.
und einfacher Code, um API aufzurufen und Antwort zu behandeln.
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
self.API_Formation_Function("[email protected]", 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.
}
}
0
Gibt es einen bestimmten Grund, warum Sie nicht wollen, es mit CocoaPods automatisch zu tun? Lassen Sie sich nicht von der Einrichtung von CocoaPods abbringen. Sobald Sie es installiert haben, ist es wunderbar für die Aktualisierung und Verwaltung Ihrer Addons. Hier ist ein GROSSES Video-Tutorial zur Installation von CocoaPods.
https://www.youtube.com/watch?v=iEAjvNRdZa0&t=2s
Tun Sie sich selbst einen Gefallen und die Zeit nehmen, zu installieren.
Verwandte Themen
- 1. Swift 3 alamofire + SWXMLHash
- 2. Anfrage mit Alamofire und Mapkit Swift 3
- 3. Json Parsing in Swift 3 mit Alamofire
- 4. Alamofire JSON Parsing Swift 3
- 5. Alamofire 4.0, Swift 3 AFError.Swift
- 6. IOS Swift 3 Alamofire 4.0.0
- 7. Alamofire in Swift 3 mit iOS 8
- 8. Datei herunterladen mit Alamofire 4.0 (Swift 3)
- 9. swift 3 alamofire swiftyjson tiefgestellt
- 10. Swift 3 Alamofire JSON Antwort
- 11. Alamofire Timeout funktioniert nicht in Swift 3
- 12. Alamofire - Fehler beim Konvertieren von Swift 2 in Swift 3
- 13. Alamofire http-Post - Registrierung Benutzer Swift 3
- 14. Update Alamofire Swift zu verwenden 3
- 15. Firebase API mit Swift 3 und Alamofire 4
- 16. Swift 3 Alamofire Swifty JSON Parsing-Problem
- 17. kann Antwort nicht analysieren Alamofire Swift 3
- 18. Parameter an Anfrage senden Swift 3 Alamofire
- 19. Alamofire 4 Swift 3 ParameterEncoding Benutzerdefiniert
- 20. Swift 3 Alamofire geht manchmal zum Fehlerblock
- 21. Alamofire 4.0, params Swift 3 Beitrag nicht
- 22. Multipart Image Alamofire 4 swift 3
- 23. zusätzliches Argument in Call alamofire swift 3
- 24. Alamofire 4 Swift 3 GET Anfrage mit Parametern
- 25. Alamofire mit Problemen mit der YouTube-API (Swift 3)
- 26. „hat kein Mitglied“ Fehler mit Alamofire 4.0 mit Swift 3
- 27. Manuelles Hinzufügen von ManagedObject mit Restkit
- 28. Alamofire 4 swift 3 Hochladen von MultipartFormData ohne Header
- 29. Pull zum Aktualisieren und Alamofire mit Swift 3
- 30. Fehlerbehandlung in Swift 3 mit objectMapper und alamofire
können Sie mit dieser Antwort https://StackOverflow.com/questions/31706589/cannot-add-alamofire-to-swift-project versuchen –