In Objective-C, you can get the available file system space with NSFileManager:
NSFileManager* filemgr = [NSFileManager defaultManager];
NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *docDirectory = [paths objectAtIndex:0];
NSDictionary* fsAttr = [filemgr attributesOfFileSystemForPath:docDirectory error:NULL];
unsigned long long freeSize = [(NSNumber*)[fsAttr objectForKey:NSFileSystemFreeSize] unsignedLongLongValue];
To get the amount of space used by your application, read this question:
Calculate folder size
Felix source
share