How do we access device memory statistics programmatically? Suppose I want to know whats the devices total memory capacity is. For example, whether it's 16GB, 32Gb or 64GB, and how much has been utilized?
1 Answer
you can check this through the method attributesOfFileSystemForPath:
. store the returned value into dictionary and then by using key NSFileSystemSize
, you can check total memory size and by key NSFileSystemFreeSize
you can check available memory