below NSURLSessiondelegate function supporting only https receive challenge.
func URLSession(session: NSURLSession, didReceiveChallenge challenge: NSURLAuthenticationChallenge, completionHandler: (NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void)
In Info.plist , I included below stuff to allow all connections:
<key>NSAppTransportSecurity</key>
<dict>
<!--Include to allow all connections (DANGER)-->
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
to support http as well but the NSURLSession Delegate is not triggering at all.
NSURLSession - How to support http authentication challenge?
Also it will useful if its workable to Kingfisher 3rd party framework too.