# Downloading files in iOS

**URL:** <https://forum.ionicframework.com/t/downloading-files-in-ios/157766>\
**Category:** ionic-v3\
**Created:** [February 27, 2019, 9:27pm UTC](https://forum.ionicframework.com/t/downloading-files-in-ios/157766 "2019-02-27T21:27:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aishukhanna](https://avatars.discourse-cdn.com/v4/letter/a/cab0a1/32.png) [@aishukhanna](https://forum.ionicframework.com/u/aishukhanna)\
**Post date:** [February 27, 2019, 9:27pm UTC](https://forum.ionicframework.com/t/downloading-files-in-ios/157766/1 "2019-02-27T21:27:48Z")

</div>

Hello,

I am trying to download an image in my app using native plugin File in iOS. , this is the code I am using for iOS version:

Typescript file:

```auto
let folderpath = null;
if (this.platform.is('ios')) {
            folderpath = this.file.dataDirectory;
        } else {
            folderpath = this.file.externalRootDirectory;
        }

        let filename = 'temp-image.png';
        
this.file.resolveLocalFilesystemUrl(folderpath).then((res) => {
            
            this.file.writeFile(folderpath, filename, DataBlob, {replace: true}).then((success) => {
                this.alertService.showPopup('Card successfully saved to image library', 'Save card success');
            }).catch((err) => {  
                this.alertService.showPopup('Unable to save file', 'Save card error');
            });
        }).catch((error) => {
            this.alertService.showPopup('Unable to save file', 'Save card error');
        })

```

In Config xml:

```auto
<preference name="iosPersistentFileLocation" value="Library">

```

File is successfully getting stored and I get the alert providing the message in the code. But I am unable to find this file anywhere in my device. Also, I can make the app access the file it stores(like read and output the file as a base64 encoded data url with readAsDataUrl).

Is there any approach to download the files in iOS? I appreciate your time on this.

Thanks

---

<div class="post-metadata">

**Author:** ![sj9](https://avatars.discourse-cdn.com/v4/letter/s/c6cbf5/32.png) [@sj9](https://forum.ionicframework.com/u/sj9)\
**Post date:** [March 19, 2020, 11:26am UTC](https://forum.ionicframework.com/t/downloading-files-in-ios/157766/2 "2020-03-19T11:26:35Z")

</div>

the same problem for me.  
Did you find the solution?
