NSFileManager.defaultManager().fileExistsAtPath returns false instead of true

(The code in this answer has been updated for Swift 3 and later.) Apparently your path variable is a NSURL (describing a file path). To get the path as a string, use the path property, not absoluteString: let exists = FileManager.default.fileExists(atPath: path.path) absoluteString returns the URL in a string format, including the file: scheme etc. … Read more

How to detect total available/free disk space on the iPhone/iPad device?

UPDATE: Since a lot of time has passed after this answer and new methods/APIs have been added, please check the updated answers below for Swift etc; Since I’ve not used them myself, I can’t vouch for them. Original answer: I found the following solution working for me: -(uint64_t)getFreeDiskspace { uint64_t totalSpace = 0; uint64_t totalFreeSpace … Read more