File plugin: wrong disk space available on iOS?

111 views
Skip to first unread message

Alberto Pagliarini

unread,
Jun 4, 2014, 6:59:25 AM6/4/14
to phon...@googlegroups.com
Hi,

I have some issue on iOS trying to allocate more than 140 Mbytes with FIle plugin 1.0.1. I have 10 giga free on device but a QUOTA_EXCEEDED_ERROR was thrown

Here the code

var requestBytes = 150 * 1024 * 1024;

window.requestFileSystem(LocalFileSystem.PERSISTENT, requestBytes, function(fs) {
// success callback
}, function (e) {
      // error callback
});

I see that the free space calulated in requestFileSystem method of CDVFile.m results always about 144 Mbytes.

Any idea? How is the free space calculated? Are there some limits for iOS apps? 

Note that on android I haven't any issues.

regards Alberto

jcesarmobile

unread,
Jun 4, 2014, 8:48:07 AM6/4/14
to phon...@googlegroups.com
I don't see this mentioned on the documentation, but I think I read somewhere that on phonegap apps you don't have to ask for a quota, you always get the max, just use 0.

Alberto Pagliarini

unread,
Jun 4, 2014, 9:18:27 AM6/4/14
to phon...@googlegroups.com
I ask quota because I want to inform the user if there isn't enough space on the device before the user starts to download files. If you set 0 as size I suppose that the download starts and an error is thrown if the space is exhausted.


--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
 
For more info on PhoneGap or to download the code go to www.phonegap.com
---
You received this message because you are subscribed to a topic in the Google Groups "phonegap" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/phonegap/0er5Gp2c-gQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to phonegap+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
------ bato -------

jcesarmobile

unread,
Jun 4, 2014, 9:55:56 AM6/4/14
to phon...@googlegroups.com
I've been testing and it seems you found a bug.
My device have 12GB available and the app says it has 151392256 available, and total memory 1638060032, that makes no sense.

File a bug repport on phonegap's jira web.

Alberto Pagliarini

unread,
Jun 4, 2014, 11:10:14 AM6/4/14
to phon...@googlegroups.com


Il giorno mercoledì 4 giugno 2014 15:55:56 UTC+2, jcesarmobile ha scritto:
I've been testing and it seems you found a bug.
My device have 12GB available and the app says it has 151392256 available, and total memory 1638060032, that makes no sense.

File a bug repport on phonegap's jira web.

jcesarmobile

unread,
Jun 4, 2014, 2:07:20 PM6/4/14
to phon...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages