You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Shazron Abdullah (JIRA)" <ji...@apache.org> on 2013/04/09 22:58:17 UTC

[jira] [Updated] (CB-2935) window.requestFileSystem(LocalFileSystem.PERSISTENT...) works only once on IOS

     [ https://issues.apache.org/jira/browse/CB-2935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shazron Abdullah updated CB-2935:
---------------------------------

    Fix Version/s: 2.7.0
    
> window.requestFileSystem(LocalFileSystem.PERSISTENT...) works only once on IOS
> ------------------------------------------------------------------------------
>
>                 Key: CB-2935
>                 URL: https://issues.apache.org/jira/browse/CB-2935
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.3.0
>         Environment: iOS on iPad3,iPad2
>            Reporter: nik600
>            Assignee: Shazron Abdullah
>             Fix For: 2.7.0
>
>
> window.requestFileSystem(LocalFileSystem.PERSISTENT...) works only once on IOS 
> Using phonegap build with phonegap 2.3.0 i've build a very simple example that open an alert window with informations about the filesystem. 
> When you open the application the first time the gotFS handler is called correclty. 
> If you click on the "test" link, the 2nd time the handler is no longer called, it seems that the window.requestFileSystem callback works only the first time. 
> On Android it works without problem. 
> Thanks to all in advance.
> Here is my example-code: 
> <!DOCTYPE html> 
> <html> 
> <head> 
> <title>window.requestFileSystem problem</title> 
> <script type="text/javascript" charset="utf-8" src="phonegap.js"></script> 
> <script type="text/javascript" charset="utf-8"> 
> // Wait for Cordova to load 
> // 
> document.addEventListener("deviceready", onDeviceReady, false); 
> // Cordova is ready 
> // 
> function onDeviceReady() { 
> window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFS, fail); 
> } 
> function gotFS(fileSystem) { 
> alert(fileSystem.root.fullPath); 
> } 
> function fail(error) { 
> alert(error.code); 
> } 
> </script> 
> </head> 
> <body> 
> <h1>Example</h1> 
> <p>Write File</p> 
> <a href="index.html">test</a> 
> </body> 
> </html>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira