Internal error CFNetwork: URLConnectionLoader.cpp: 289

When I open the application after a while, I got a log:

440: internal CFNetwork error (0xc01a: /BuildRoot/Library/Caches/com.apple.xbs/Sources/CFNetwork/CFNetwork-758.4.3/Loading/URLConnectionLoader.cpp: 289)

It has never been in the past. My project uses the AFNetworking and CocoaAsyncSocket network library.

Why is this happening and how to fix it?

+7
ios xcode cfnetwork
source share
2 answers

I solved my situation, this is not an AFNetwork problem, I use invalid SSL and SDWebImage certification, when I use the "SDWebImageAllowInvalidSSLCertificates" option in SDWebImage and get an http image (not an https image), you will get this error. protocol (http or https) is not automatically recognized by SDWebImage.

my solution: I do not change the SDWebImages code, I just write a wrapper for the recognized protocol (http or https). I use the "0" parameter for http images and the "SDWebImageAllowInvalidSSLCertificates" parameter for https images (my https certification is self-signed or invalid). If your certificate is valid, I think SDWebImage works well.

+1
source share

I solved this problem by adding the following attributes to info.plist

 <key>NSAppTransportSecurity</key> <dict> <key>NSExceptionDomains</key> <dict> <key>http://mydomain</key> <dict> <key>NSExceptionRequiresForwardSecrecy</key> <false/> <key>NSExceptionAllowsInsecureHTTPLoads</key> <true/> <key>NSIncludesSubdomains</key> <true/> </dict> </dict> <key>NSAllowsArbitraryLoads</key> <true/> </dict> 
+1
source share

All Articles