Check available space for iOS/android device in app


in our app we’re using modules file and camera and some users having problems with app because they don’t have enough space available on their devices.

is there a way to check and notify a user that their device don’t have available space?


Hi Igor,

I’ve just released v2.13 of the file module which adds a new API to retrieve device storage information.

You can use it like this:

forge.file.getStorageInformation(function (info) {
    forge.logging.log("Total space on device: " +;
    forge.logging.log("Free space on device: " +;
}, function (e) {
    // handle any errors

The success callback also includes information for app and cache directory sizes, for more information check out the module documentation.


this works, thank you very much!