0

I am getting an "uncommon" error when I try to download a PFFile data in background. I have this code :

        pfimage.getDataInBackgroundWithBlock {
        (imgData:NSData?,error: NSError?) -> Void in
        cell.imagen.image = UIImage(data: imgData!)
    }

The weird thing about this, is that I am getting an error in the simulator and in my Ipad, but I am not getting any errors in my iphone.

This is the error:

2016-03-26 00:48:32.769 App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.

I dont understand why this is happening since my connection to the parse server is in https:...., besides why is only happening in my ipad and simulators ( both ipad and iphone are in the same ios version )

I know many answers just say to add the exception in the plist but isnt there any other way?

Dávid Pásztor
  • 51,403
  • 9
  • 85
  • 116
  • Hi Ricardo, that is weird, I have the exact opposite problem. My code (essentially identical to yours) run on simulator but when put on actual device it crashes with App Transport Security error. The offending line is clearly .getDatainBackgroundWithBlock({ ... }) as if that is swapped out to use a local image instead the app does not crash on actual device. Shall we compare settings? Like you I want to avoid doing that fudge on info.plist. I'm running xcode 7.3.1 (7D1014) on OSX 10.11.6 (15G31) and ios 9.3.3 on iphone 6+. App targeted at >=9.0 – rockhammer Aug 19 '16 at 00:13
  • @rockhammer I'm having the same problem as you. I can't download PFFiles in the app on my physical device because it tries to use http, even though I set my server as https://... – Eugene Sep 04 '16 at 20:51

0 Answers0