WriteFile is not working in ios

Hi guys…
I am developing iPhone app by using ionic for writing and reading data from file.I can able to check whether the file is present or not by using the code
$cordovaFile.checkFile(cordova.file.dataDirectory, ‘file.json’)
.then(function(success) {
alert(‘found’);
}, function(error){
alert('didn’t find the file: ’ + error.code);
});

but i couldn’t write the data by using the code
$cordovaFile.writeFile(cordova.file.dataDirectory,‘file.json’, response,true)
.then(function (success) {
// success
alert(“written success”);
}, function (error) {
// error
});
The above code is working well in android not ios
can anyone help me out please?

1 Like

it is not working for me neither. ??