Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70765

iOS 10.3 - writeFile - not working {replace: true}?!

$
0
0

@slagusev wrote:

I’m using a plugin, Native File. On the android this code works, on iOS creates once, but does not overwrite the file. Errors do not return

public loadGallery():void{
let options ={
maximumImagesCount: 20,
width: 500,
height: 500,
quality: 75
};
this.imagePicker.getPictures(options).then((result) => {
for (let i = 0; i < result.length; i++) {
this.imgList.push({‘win’:{id: result[i], title: result[i]}});
}
let builder = new xml2js.Builder();
let xml = builder.buildObject(this.imgList);
this.file.writeFile(this.file.dataDirectory,‘mywins.xml’, xml, {replace: true});
},
function(errmsg){
console.log(’---->’+ errmsg)
});
}

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70765

Trending Articles