Helloo! My ultimate goal is to create a UITableViewController
with recordings made in-app, using FileManager
to traverse the /Documents/
You cannot save a sandboxed file URL or path string for later use, because the sandbox can move. You need to do what you were doing before, successfully: calculate the documents directory URL and then examine it. You should work entirely with URLs and never call absoluteString
at all; it is the wrong call entirely and is letting you down here.
In this example, I check the documents directory for any files whatever:
let documentsDirectory =
FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0]
let results =
try? FileManager.default.contentsOfDirectory(at: documentsDirectory,
includingPropertiesForKeys: nil)