简体   繁体   English

以编程方式查找iphone内存的问题

[英]problem while finding iphone memory programmatically

I am facing a strange problem with my iphone. 我的iphone遇到了一个奇怪的问题。 It shows available memory as 278 Mb from settings and also in the itunes . 它显示可用内存为278 Mb,来自设置和itunes But when I find it programmatically like this 但是当我以编程方式发现它时

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

I am getting it as 458.0 Mb . 我得到的是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. 因为两个值都应该相同。

The iPhone uses a solid state drive, which doubles as it's own system RAM. iPhone使用固态硬盘,它可以兼作自己的系统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. 请使用iTunes告诉您的数字,否则可能会出现一些严重的系统错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM