Cordova-plugin-file-transfer download not working when emulating i0s 9

I am having a problem with cordova-plugin-file-transfer and Xcode simulator running 6 iOs 9. When I attempt to download the a .mp3 file located on an aws s3 bucket that is publicly accessible, I am getting a Code 3 error, which translates to a FileTransferError.CONNECTION_ERR, according to github repo. However, when I run this code on i0s 8.2 iphone 6 works without throwing a connection error…

       $ionicPlatform.ready(function() {
          if($cordovaDevice.getPlatform() == 'iOS'){
             fileDeviceDir =  cordova.file.dataDirectory;
             fileDeviceDir  =  cordova.file.externalRootDirectory;

      function getDownload(){
          var targetPath = fileDeviceDir + 'birds.mp3'
           var uri = encodeURI(''l);
               $, targetPath, {}, true)
                      function(entry) {
                           console.log("File Downloaded");
                      function (err) {
                          console.log('File Download error: ', err);
                      function (progress) {
                            $timeout(function () {
                             var percentComplete = (progress.loaded / * 100;
                              console.log('[File Download -progress- percentComplete ="+percentComplete);

my config.xml file

        <content src="index.html"/>
      <access origin="*"/>
         <platform name="ios">
           <config-file platform="ios" target="*-Info.plist" parent="NSAppTransportSecurity">
        <access origin="*"/>
       <preference name="phonegap-version" value="cli-5.2.0" />
       <preference name="AndroidPersistentFileLocation" value="Internal"/>
         <preference name="webviewbounce" value="false"/>
         <preference name="UIWebViewBounce" value="false"/>
        <preference name="DisallowOverscroll" value="true"/>
       <preference name="android-minSdkVersion" value="16"/>
        <preference name="BackupWebStorage" value="none"/>
       <feature name="StatusBar">
             <param name="ios-package" value="CDVStatusBar" onload="true"/>

Can any one point me in some direction? I have been searching for the last couple days and I am stuck.

As I have read that some folks, suggest making sure you have the latest cordova-plugins… from my package.json
“name”: “cordova-plugin-file-transfer”,
“version”: “1.3.0”,


Thanks in advance.

maybe you have to set some security settings to allow your app to communicate with the download server.
Look at the part about “Transport Security”

PS: nice monchichi :slight_smile:

@bengtler Thank You So much…

I had a posting similar to the blog ling in my search for a cure… and created the entry in my
config.xml based on the posting…

         <platform name="ios">
            <config-file platform="ios" target="*-Info.plist" parent="NSAppTransportSecurity">

but it either was not posted or a failed to understand it clear… you have to create a hook, from the link…
" To fix, edit the MyApp-Info.plist file and add the contents of this patch."

after reading the responses to the posting in the GIST. I discover this link to a hook which seems to be the key ingredient I was missing…

Once Again, Thanks

How to add the hook in ionic 3 project? can you tell me step by step?

Im getting = 0. So here percentComplete becoming infinity everytime. Any solution for it ?