I would like to retrieve the storage information programmatically like capacity, available storage, total number of apps, videos, pics etc.. Thanks in advance..
I would like to retrieve the storage information programmatically like capacity, available storage, total
Share
Looks like WrightsCS answered disk space question.
If you want number of images, check out
ALAssetsLibraryof theAssetsLibrary.framework(you’ll have to include this framework in your “Link Binary With Libraries” section of theTargetsettings) and then:If you want to access the iTunes library on non-jailbroken devices, check out the iPod Library Access Programming Guide, which shows you how to use
MPMediaQuery(remember to include theMediaPlayer.frameworkin your project), and then:I don’t know if there’s a published API for getting the number of apps. There are solutions for jailbroken devices, but I don’t know about the rest of us.
You didn’t ask about this, but if you want available RAM (not flash storage, but memory available for apps), you can get it via: