0

I want to know what is the total disk size of the device my app is running on. For example, I want to find whether it is an iphone6 16gb or 32gb.

In SystemInfo, there is a property systemMemorySize. But that returns the amount of RAM. I want to find the hard disk size. How to do that?

Thanks.

Salman Younas
  • 320
  • 1
  • 4
  • 18

1 Answers1

1

The DriveInfo class is used to do something like on Windows or Desktop computers. Not sure if that will work on iOS since it uses the GetDrives() function to get disk size. The real solution is to make a native plugin with Objective-C.

Luckily, there is a free plugin for this called Simple Disk Utils on the Asset store. You can also get its source code from here.

Available functions:

int CheckAvailableSpace(); 
int CheckBusySpace();
int CheckTotalSpace(); //<--- You need this
Programmer
  • 104,912
  • 16
  • 182
  • 271