views:

61

answers:

1

I am facing a strange problem with my iphone. It shows available memory as 278 Mb from settings and also in the itunes . But when i find it programatically like this

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

I am getting it as 458.0 Mb. Can any one help me out why i m having so much difference between both the values ?? As both the values should be same

Thanks in advance

+1  A: 

The iPhone uses a solid state drive, which doubles as it's own system RAM. So it keeps a percentage of the total drive for use at runtime.

Go with the number iTunes is telling you, because otherwise there could be some critical system errors.

Marmaduke
Yeah.. when in doubt, go with the low number! :D
Jasconius