Hi,
I have a json file on my web that I use for ads in my app.
Json file is downloaded with the code below:
function networkListener( event ) if ( event.isError ) then print( "Network error - download failed" ) elseif ( event.phase == "began" ) then print( "Progress Phase: began" ) elseif ( event.phase == "ended" ) then print( "Done" ) json = require("json") src = "toddler.json" path = system.pathForFile(src, system.DocumentsDirectory) saveData = io.open(path, "r") Data = saveData:read("\*a") t = json.decode(Data) io.close(saveData) end end local params = {headers = { ["Accept-Encoding"] = "" }} params.progress = true network.download( "http://my-domain.com/app/toddler.json", "GET", networkListener, params, "toddler.json", system.DocumentsDirectory )
Now I have a problem with download on iOS. On android everything works perfectly: json file is downloaded, ads are showing and working,
even when I update json file on the web, the updated version is downloaded (old one in the system.DocumentsDirectory is deleted before that) and working as it should - but only on android.
On iOS it downloads the json file but shows old content of the file, which is totally strange because old file is deleted 
Any ideas what I’m doing wrong?
Mladen
