I have a small file, which is a required file for the app to function at all, and must be ready before creating the first view.
Because of loading other things asynchronously, and this file having to be ready before those, I can’t download this file asynchronously, because that would make the error checking, view creating and redirection to another view if error EXTREMELY complex.
Corona is usually so excellent that I can’t believe there’s no oneliner for this, let alone an example on the network.download manual page.
The problem I’m having with the docs is that it says it’s possible and yet has a REQUIRED listener parameter.
Loading synchronously means: don’t execute the next line of code until the loading has finished. I just can’t see how Lua would know to do that if asked to redirect to a listener.
So: I want to download a file url to a filename in the temporary directory that I specify, and then on the next line load that file into my app. Which is the best practice method?