Testing it on iPhone X Simulator
Writing to a file and reading the file immediately after write as below:
this.file.writeFile(this.file.dataDirectory +"masters.json", JSON.stringify(jsonData), this.writeOptions)
.then((saved) => {
console.log(saved);
return this.http.get(this.file.dataDirectory +"masters.json")
.toPromise()
.then((response) => {
return Promise.resolve(response);
});
})
.catch((err) => {
console.log(err);
return Promise.reject(err);
});
But, When File is read it shows old File data. After few random restarts the file will reflect new changes.
Same code works perfectly fine on Android.
Any solution?