Questions tagged [alamofire5]
26 questions
1
vote
2 answers
Alamofire 5 alternative to sessionDidReceiveChallenge
I have just shifted to Alamofire 5.
Earlier I used URLSession and Certificate Pinner and to handle auth challenge I used delegate method of URLSessionDelegate with hash values
func urlSession(_ session: URLSession, didReceive challenge:…

Dhruv
- 2,153
- 3
- 21
- 45
0
votes
1 answer
Migration Alamofire 4 to 5 build issue
I am doing migration after 2 years a lots things have been changed, now flagging a lots of error while building. Most are related to Alamofire 5. Now there are many error keeps coming fixing one by one.
Error: // ERROR: Cannot specialize non-generic…

Sanoj Kashyap
- 5,020
- 4
- 49
- 75
0
votes
0 answers
Alamofire 5 SSL certificate pinning shows AFError.sessionDeinitialized
I am using 'Alamofire', '~> 5.4' for request & response. I need to add SSL certificate pinning. But it shows bellow error..
failure(Alamofire.AFError.sessionDeinitialized)
Here is my Code :
static func callingAp(){
let cirfitcate =…

Enamul Haque
- 4,789
- 1
- 37
- 50
0
votes
0 answers
Alamofire synchronous request
I'm trying to make a Log In Call to the backend using Alamofire 5. The problem is when I make the call I need a value to return to the Controller to validate the credentials.
So, the problem is Alamofire only make asynchronous calls so I need to…

Alekz Mtz E
- 1
- 1
0
votes
1 answer
Is it possible to have smaller packets when uploading images in Alamofire?
my code is something like this:
Alamofire.upload(multipartFormData: { (data) in
// add bunch of large size images
}
.uploadProgress { progress in
// print progress
}
.downloadProgress { progress in
// print progress
}
the problem is that…

medics
- 5
- 3
0
votes
2 answers
cast server response in AFError
What I'm trying to achieve is that I have a NetworkManager that handles the request's to the server, and handle the error through AFError.
However sometimes when the server response is 4xx, there is a custom message with that response which I want…

Mohammad
- 1
- 5
0
votes
1 answer
How to load data BOTH from cache and from network using Alamofire?
I'm trying to use caching to make my iOS app more snappy. What I would like to do for every request is to:
return data from cache if present
if connected to the internet, load data from API in the background
if data from API is different from what…

Sebastien
- 3,583
- 4
- 43
- 82
0
votes
0 answers
Alamofire 5 multipart image upload issue swift for flask API
I was trying to upload single image via Alamofire 5 multipart data, API is working fine on Postman as well as on android side, but it is not working on iOS side.
API is developed in Python flask. Image is taken from camera and by using…

sagar ss
- 23
- 7
0
votes
2 answers
Custom validation error no longer working in Alamofire 5
Using Alamofire 4, we had an API response validator in place we invoked like so:
func request(_ baseURL: URL, endpoint: Endpoint, completion: @escaping (_ object: Endpoint.ResponseType?, _ error: AFError?) -> Void) ->…

Terry Torres
- 131
- 1
- 9
0
votes
1 answer
override sessionDidReceiveChallenge method to bypass server trust issue in Alamofire5
Hi all we were using alamofire 4.9.1 before and recently i have upgraded to Alamofire 5 and with that we are facing bellow error
The certificate for this server is invalid. You might be connecting to a server that is pretending to be “XXX.XXX.XX.X”…

abhishekkharwar
- 3,529
- 2
- 18
- 31
0
votes
1 answer
Upload an Image to a server from UIImagePickerController using Alamofire 5.0 swift 5
I want to ask how to upload an Image to a server from UIIMagePicker Controller using Alamofire 5.0 with swift 5.
Here is my code which is not really working
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo…
user13520250