Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTTP load failed (error code: -1200 [3:-9802])

NSURLSession/NSURLConnection HTTP load failed , -9802

I am having same issue as this question. I am using af_image in Swift 4.1 to load images from server and display in my collection view. Here it is the code for the same :-

templateCell.templateCellImage.af_setImage(withURL: imageUrl!, placeholderImage: nil, filter: nil, progress: nil, progressQueue: DispatchQueue.main, imageTransition: .crossDissolve(0.5), runImageTransitionIfCached: false, completion: nil)

It was working fine but then suddenly it has an error now -

Task <6ED07D2C-ACA3-4837-AC5F-4D6058772A1A>.<5> HTTP load failed (error code: -1200 [3:-9802])
2018-09-27 15:03:36.664865+0530 QC_TEST[7188:175211] Task <6ED07D2C-ACA3-4837-AC5F-4D6058772A1A>.<5> finished with error - code: -1200
2018-09-27 15:03:37.204685+0530 QC_TEST[7188:175211] TIC TCP Conn Failed [7:0x60000016c0c0]: 3:-9802 Err(-9802)

I have tried everything in plist yet it is not working. Could you please help me?

like image 594
Ashutosh Shukla Avatar asked Jul 11 '26 20:07

Ashutosh Shukla


1 Answers

As requested in comment, I am posting the answer to this question -

I have found the solution, it was a problem with Info.Plist Under "App Transport Security settings" there should be "YES" only for "Allow Arbitrary loads" not for both "Allow Arbitrary loads" & "Allow Arbitrary loads in Web Content too".

like image 152
Ashutosh Shukla Avatar answered Jul 13 '26 11:07

Ashutosh Shukla



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!