swift - NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802) -


i getting error: nsurlsession/nsurlconnection http load failed (kcfstreamerrordomainssl, -9802), , suspect because of querying images parse. here method querying:

func fetchimageforemployee(employee: pfemployee, completion: (error: string?, image: uiimage?) -> void) {     if (employee.profilepicture == nil) {         completion(error: "no image file", image: nil)     } else {         employee.profilepicture!.getdatainbackgroundwithblock({ (data, error) -> void in             if let error = error {                 let errorstring = error.userinfo["error"] as? string                 completion(error: errorstring, image: nil)             } else if (data != nil) {                 let image = uiimage(data: data!)                 completion(error: nil, image: image)             } else {                 completion(error: nil, image: nil)             }         })     } } 

i printed error, , appeared in debugger: attempting load view of view controller while deallocating not allowed , may result in undefined behavior (uisearchcontroller: 0x13ee44dc0)

i don't know going wrong, answers appreciated.

right click on info.plist file > open > source code, , add following before latest </dict> :

<key>nsapptransportsecurity</key>   <dict>      <key>nsallowsarbitraryloads</key>      <true/>   </dict>  

in ios9, ats enforces best practices during network calls, including use of https. read more in apple documentation.


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -