claen==CLEAN—typo in heading apologies…
Hi
I have a piece of code that runs succesfully in Corona and in OSX simulators and on IOS as well. Great!
BUT, if I do an APP UPDATE ,[instead of remove and install] the code fails with file or directory not found.
Here is the code
local params = {}
params.progress = “download”
params.response = { filename = “temp.txt”,baseDirectory = system.TemporaryDirectory}
network.request( _G.set.Url, “GET”, networkListener, params )
If I delete the ‘temp folder’ in corona simulator sandbox to try to simulate no directory it still works ok and the temp folder is created. If I uninstall from IOS and do a clean install with new version of app it still runs ok.
It is only if I update [in-place] the app fails. This situation is created by deleteing the app in iTunes, leaving the old app on iphone, add into iTunes the new app.The button caption changes to update, rather than install. I assume this simulates a real app update once published.
From the debug console
[My debug print]
Jun 11 12:42:16 Alecs-Laptops-iPhone ULTrA[600] <Warning>: PATH USED= /private/var/mobile/Applications/EF15DFB3-559F-40CD-A82F-73827C910981/tmp/temp.txt
[IOS output]
Jun 11 12:42:16 Alecs-Laptops-iPhone ULTrA[600] <Warning>: Runtime error
/Users/aleccockleNewMacbook/Library/Application Support/Outlaw/Sandbox/364/Trends/Results.lua:54: bad argument #1 to ‘lines’ (/private/var/mobile/Applications/EF15DFB3-559F-40CD-A82F-73827C910981/tmp/temp.txt: No such file or directory)
stack traceback:
What other code do I need to test obscure condition of network request not creating in this situation? Ideas welcomed
Alec