F fenrus110 macrumors regular Original poster Jan 16, 2009 #1 Not sure if this is possible, but can you detect the amount of disk space left on the device? For an app that has a sqlite database and/or stores images or something, it could be a concern.
Not sure if this is possible, but can you detect the amount of disk space left on the device? For an app that has a sqlite database and/or stores images or something, it could be a concern.
P Pring macrumors 6502 Jan 17, 2009 #2 Code: NSDictionary *fsAttr = [[NSFileManager defaultManager] fileSystemAttributesAtPath:NSHomeDirectory()]; unsigned long long freeSpace = [[fsAttr objectForKey:NSFileSystemFreeSize] unsignedLongLongValue]; will return the free space available to you, in bytes
Code: NSDictionary *fsAttr = [[NSFileManager defaultManager] fileSystemAttributesAtPath:NSHomeDirectory()]; unsigned long long freeSpace = [[fsAttr objectForKey:NSFileSystemFreeSize] unsignedLongLongValue]; will return the free space available to you, in bytes