I’m attempting to improve the radar utilizing a firmware file. I’m deciding on a firmware file utilizing a doc picker and saving its path to a singleton class variable. However the issue is after I go to the background and return it exhibits that the file doesn’t exist in that path. How can I resolve the problem? The code for saving the trail is
`
let file = urls[0]
do {
let filePath = file.path
self.firmwareLocalfilePath = filePath
SessionController.sharedController.filePath = self.firmwareLocalfilePath
‘
Right here SessionController.sharedController.filePath is my singleton variable. The situation to examine file availability is
if FileManager().fileExists(atPath: self.firmwareLocalfilePath!)
After I go to the background and are available again it’s getting that
“File doesn’t exist [/private/var/mobile/Containers/Data/Application/92D35520-C1E8-44DD-960E-B7024E8602E8/tmp/com.houston-radar.app-Inbox/dc300b04_v297.frm]”
There are many different kinds of stuff there that is why I’m not importing the complete code. The code is said to the file I wrote right here. How can I resolve this situation? Can I save the file someplace like userdefault. I googled it rather a lot however didn’t get any resolution. Thanks in your assist