problem finding iphone memory programmatically

I have a strange problem with my iphone. Shows available memory as 278 MB from settings, as well as in itunes . But when I find it programmatically, like this

NSDictionary *fileSystemAttributes = [[NSFileManager defaultManager] attributesOfFileSystemForPath:NSHomeDirectory() error:&error];
double availableSpace = [[fileSystemAttributes objectForKey:NSFileSystemFreeSize] floatValue];

I get this as 458.0 MB . Can anyone help me, why do I have so many differences between these values? Since both values ​​should be the same.

+3
source share
1 answer

The iPhone uses a solid state drive, which doubles as it is its own system RAM. Thus, it holds a percentage of the total number of disks to use at runtime.

, iTunes , .

+1

Source: https://habr.com/ru/post/1741939/


All Articles