Reputation: 368
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?
Upvotes: 3
Views: 3956
Reputation: 368
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".
Upvotes: 1