Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 228595

WriteFile is not working in ios

$
0
0

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?


Viewing all articles
Browse latest Browse all 228595

Trending Articles