Post

Replies

Boosts

Views

Activity

Background Tasks with local files
The app I develop allows user to store chosen file in encrypted form inside app directory (local). Now, lets say user wants to open a big file (>1gb) that is stored inside app. This can take quite some time, as I have the file split into multiple ones and need to decrypt them. What would be the procedure to allow this to work even when the app is suspended? As it is somewhat similar to upload/download, would want to use URLSession in background, but it does not support local files. I guess I could be using beginBackgroundTask, but it has limited execution time and it would feel like a hack (if user returns to app, I again beginBackgroundTask and continue to do this until task completes). Any suggestions? To be clear - all tasks are started in foreground and I don't want to use scheduling, as user would like to get the file as soon as possible.
0
1
506
Apr ’23