I am trying to delete a file, but somehow nsfilemanager will not allow me to do so. I do use the file in one line of code, but once that action has been ran, I want the file del
I just figure it out of something very important when you use NSFileManager. You have to be aware of App Sandboxing.
let documentDirectory = NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory.DocumentDirectory, .UserDomainMask, true)[0]
This line return the path document directory of your app sandboxed. When you create a file with FileManager in your document directory (for e.g) don't save the full file path but only the path from the current document directory.
You'll be able to recreate the full path of your created file.
Hope (after 5 years) help over developers ;-)