Problem Downloading Insecure Images On iOS

I ran into a problem downloading insecure http:// images on iOS using the HTTP plugin. The downloadFile request fails with the error There was an error downloading the file.

I suspect it’s related to iOS restrictions on insecure content, so think setting setSSLCertMode to nocheck would help.

However whenever I try calling setSSLCertMode I get the warning Ionic Native: tried calling HTTP.setSSLCertMode, but the HTTP plugin is not installed in the console.

Ionic Native: tried calling HTTP.setSSLCertMode, but the HTTP plugin is not installed.
Install the HTTP plugin: 'ionic cordova plugin add cordova-plugin-advanced-http'

The plugin is installed though, since I can remove the setSSLCertMode call and HTTP requests work fine.

Unfortunately some of our images are hosted on Rackspace on http:// and haven’t been migrated to https://, so I’m stuck trying to load these insecure images.

Any thoughts or suggestions?

Since I’m not having much luck with HTTP plugin, I tried FileTransfer plugin instead however for any http:// images the download promise never returns or even throws an error.

let url = "";
let file = this.file.cacheDirectory + "image.jpg";
let fileTransfer:FileTransferObject = this.transfer.create();, file, true).then((entry:any) => {
(error:any) => {

Hmm, what’s kind of baffling is this use to work fine previously. So either it’s being caused by tighter iOS security restrictions or there’s a problem in the latest native plugins.

Ok, think I tracked down the issue, just posting in case someone runs into the same problem.

Looks like the config.xml had some changes to the access tags to increase security in the app. However the unintended side effect must have been blocking access to those http:// images on Rackspace.

If I removed all the access tags and just add the following, then the images download and load fine in the app.

<access allows-arbitrary-loads-for-media="true" allows-arbitrary-loads-in-web-content="true" allows-local-networking="true" origin="*" />

More information about access tags here