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

Madison Dickson updated CB-11639:
---------------------------------
    Description: 
On iOS and Android I am getting different values for resolved URLs, each with a 
different expected outcome.

Using the following code:
{code|borderStyle=solid}
        console.log("== TESTING URLS ==")
        console.log("direct: "+cordova.file.dataDirectory)
       
resolveLocalFileSystemURL('cdvfile://localhost/persistent/',function(entry){
            console.log("cdvfile: "+entry.toURL())
            console.log("== END TESTING URLS ==")
        })
{code}

on Android, with default AndroidPersistentFileLocation = "Internal":
    direct: file:///data/user/0/co.square2.audiotest/files/
    cdvfile: file:///data/user/0/co.square2.audiotest/files/files/
ISSUE: either missing or adding an extra 'files' folder

on iOS: without specifying iosPersistentFileLocation
    direct: 
file:///var/mobile/Containers/Data/Application/9912BB39-58FE-41BB-9588-8BDBAFF63A03/Library/NoCloud/
    cdvfile: 
file:///var/mobile/Containers/Data/Application/9912BB39-58FE-41BB-9588-8BDBAFF63A03/Documents/

after specifying iosPersistentFileLocation="Library" in config:
    direct: 
file:///var/mobile/Containers/Data/Application/9912BB39-58FE-41BB-9588-8BDBAFF63A03/Library/NoCloud/
    cdvfile: 
file:///var/mobile/Containers/Data/Application/9912BB39-58FE-41BB-9588-8BDBAFF63A03/Library/files/

ISSUE: results do not match expected, and do not match documentation.
"Persistent and private data storage within the application's sandbox using 
internal memory" describes `cordova.file.dataDirectory`, which I would expect 
to match `cdvfile://localhost/persistent/` (knowing that there are technically 
a few valid options for "persistent" when selected via cordova.file.*) 
(https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html#ios-file-system-layout)
Note: Since the Library url ends with "/files", could this be related to the 
Android issue?

  was:
On iOS and Android I am getting different values for resolved URLs, each with a 
different expected outcome.

Using the following code:
{code:title=Bar.javascript|borderStyle=solid}
        console.log("== TESTING URLS ==")
        console.log("direct: "+cordova.file.dataDirectory)
       
resolveLocalFileSystemURL('cdvfile://localhost/persistent/',function(entry){
            console.log("cdvfile: "+entry.toURL())
            console.log("== END TESTING URLS ==")
        })
{code}

on Android, with default AndroidPersistentFileLocation = "Internal":
    direct: file:///data/user/0/co.square2.audiotest/files/
    cdvfile: file:///data/user/0/co.square2.audiotest/files/files/
ISSUE: either missing or adding an extra 'files' folder

on iOS: without specifying iosPersistentFileLocation
    direct: 
file:///var/mobile/Containers/Data/Application/9912BB39-58FE-41BB-9588-8BDBAFF63A03/Library/NoCloud/
    cdvfile: 
file:///var/mobile/Containers/Data/Application/9912BB39-58FE-41BB-9588-8BDBAFF63A03/Documents/

after specifying iosPersistentFileLocation="Library" in config:
    direct: 
file:///var/mobile/Containers/Data/Application/9912BB39-58FE-41BB-9588-8BDBAFF63A03/Library/NoCloud/
    cdvfile: 
file:///var/mobile/Containers/Data/Application/9912BB39-58FE-41BB-9588-8BDBAFF63A03/Library/files/

ISSUE: results do not match expected, and do not match documentation.
"Persistent and private data storage within the application's sandbox using 
internal memory" describes `cordova.file.dataDirectory`, which I would expect 
to match `cdvfile://localhost/persistent/` (knowing that there are technically 
a few valid options for "persistent" when selected via cordova.file.*) 
(https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html#ios-file-system-layout)
Note: Since the Library url ends with "/files", could this be related to the 
Android issue?


> cordova.file.dataDirectory does not match resolved 
> resolveLocalFileSystemURL('cdvfile://localhost/persistent/',...); Android & 
> iOS
> ----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CB-11639
>                 URL: https://issues.apache.org/jira/browse/CB-11639
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android, iOS, Plugin File
>    Affects Versions: 4.2.0
>         Environment: Building OSX 10.11.5. 
>            Reporter: Madison Dickson
>
> On iOS and Android I am getting different values for resolved URLs, each with 
> a different expected outcome.
> Using the following code:
> {code|borderStyle=solid}
>         console.log("== TESTING URLS ==")
>         console.log("direct: "+cordova.file.dataDirectory)
>        
> resolveLocalFileSystemURL('cdvfile://localhost/persistent/',function(entry){
>             console.log("cdvfile: "+entry.toURL())
>             console.log("== END TESTING URLS ==")
>         })
> {code}
> on Android, with default AndroidPersistentFileLocation = "Internal":
>     direct: file:///data/user/0/co.square2.audiotest/files/
>     cdvfile: file:///data/user/0/co.square2.audiotest/files/files/
> ISSUE: either missing or adding an extra 'files' folder
> on iOS: without specifying iosPersistentFileLocation
>     direct: 
> file:///var/mobile/Containers/Data/Application/9912BB39-58FE-41BB-9588-8BDBAFF63A03/Library/NoCloud/
>     cdvfile: 
> file:///var/mobile/Containers/Data/Application/9912BB39-58FE-41BB-9588-8BDBAFF63A03/Documents/
> after specifying iosPersistentFileLocation="Library" in config:
>     direct: 
> file:///var/mobile/Containers/Data/Application/9912BB39-58FE-41BB-9588-8BDBAFF63A03/Library/NoCloud/
>     cdvfile: 
> file:///var/mobile/Containers/Data/Application/9912BB39-58FE-41BB-9588-8BDBAFF63A03/Library/files/
> ISSUE: results do not match expected, and do not match documentation.
> "Persistent and private data storage within the application's sandbox using 
> internal memory" describes `cordova.file.dataDirectory`, which I would expect 
> to match `cdvfile://localhost/persistent/` (knowing that there are 
> technically a few valid options for "persistent" when selected via 
> cordova.file.*) 
> (https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html#ios-file-system-layout)
> Note: Since the Library url ends with "/files", could this be related to the 
> Android issue?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to