0

For example, my iPhone has 60MB free storage space and I have videoA which size is 23MB, and videoB which size is 47MB. In my App, i am trying to save the selected video to camera roll. Both videoA and videoB are smaller than the available free space but I can only successfully save videoA to camera roll. It's fine that I can not save the videoB because its in very limited space but is there any programmatically way to detect this?
I have tried "How to detect total available/free disk space on the iPhone/iPad device? ". But the free space I got from this code is quite different from what I see in the Settings->General->Usage->STORAGE. The free space I got from the code is 215MB. No idea what causes this difference.

Community
  • 1
  • 1
srjohnhuang
  • 222
  • 3
  • 18
  • How do you know there is only 60MB left? – Fogmeister Nov 18 '14 at 09:06
  • I manually check it in setting->general->usage->storage 60.1 MB Available. – srjohnhuang Nov 18 '14 at 09:16
  • @Fogmeister Before post this question, I've tried the answer you shared. But the free space I got is much different from what I see in the setting. The free space I got from getFreeDiskspace() is 215 MB. – srjohnhuang Nov 18 '14 at 09:21
  • Do you not think it would have been a good idea to explain this in your question. Where, in the question, have you showed anything that you have attempted? – Fogmeister Nov 18 '14 at 09:28
  • A little search always helps: [Here is the link](http://stackoverflow.com/questions/5712527/how-to-detect-total-available-free-disk-space-on-the-iphone-ipad-device) – Lefteris Nov 18 '14 at 10:20
  • @Lefteris the link you shared show how to check your app free space and not how much space on the camera roll. I'm also have the same challenge how to let the user know that he won't be able to save a video because there is no space in his camera roll. I want to do that prior to the actual save. – Pichirichi Dec 24 '14 at 07:00
  • @Pichirichi My target is same as yours, I still not found the solution yet. It would be nice if you found any solution on this and share it with us. Thanks! – srjohnhuang Dec 24 '14 at 07:07

0 Answers0