[
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":
{noformat}
direct: file:///data/user/0/co.square2.audiotest/files/
cdvfile: file:///data/user/0/co.square2.audiotest/files/files/
{noformat}
*ISSUE:* either missing or adding an extra 'files' folder. Also of note: the
data/user/ path on a Marshmallow 6.0 device, which differs from the documented
data/data path.
on iOS, after specifying iosPersistentFileLocation="Library" in config:
{noformat}
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/
{noformat}
*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.*) The Quirks documentation does not say where in /Library the new
setting will apply.
(https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html#ios-file-system-layout)
Notes:
- Since the Library url ends with "/files", could this be related to the
Android issue?
- Why is iOS defaulted to Compatibility, while Android's is defaulted to the
new "Internal" storage?
I found these inconsistencies while trying to troubleshoot why I couldn't
simply use {{cdvfile://localhost/persistent/file.name}} for audio recording via
the cordova-plugin-media plugin.
was:
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":
{noformat}
direct: file:///data/user/0/co.square2.audiotest/files/
cdvfile: file:///data/user/0/co.square2.audiotest/files/files/
{noformat}
*ISSUE:* either missing or adding an extra 'files' folder
on iOS, after specifying iosPersistentFileLocation="Library" in config:
{noformat}
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/
{noformat}
*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.*) The Quirks documentation does not say where in /Library the new
setting will apply.
(https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html#ios-file-system-layout)
Notes:
- Since the Library url ends with "/files", could this be related to the
Android issue?
- Why is iOS defaulted to Compatibility, while Android's is defaulted to the
new "Internal" storage?
> 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: Plugin File
> Affects Versions: 4.2.0
> Environment: Building on OSX 10.11.5, tested on both Android 5.2.1
> and 5.1.1, and iOS 4.2.0 and 4.1.1
> Reporter: Madison Dickson
> Priority: Minor
>
> 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":
> {noformat}
> direct: file:///data/user/0/co.square2.audiotest/files/
> cdvfile: file:///data/user/0/co.square2.audiotest/files/files/
> {noformat}
> *ISSUE:* either missing or adding an extra 'files' folder. Also of note: the
> data/user/ path on a Marshmallow 6.0 device, which differs from the
> documented data/data path.
> on iOS, after specifying iosPersistentFileLocation="Library" in config:
> {noformat}
> 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/
> {noformat}
> *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.*) The Quirks documentation does not say where in /Library the
> new setting will apply.
> (https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html#ios-file-system-layout)
> Notes:
> - Since the Library url ends with "/files", could this be related to the
> Android issue?
> - Why is iOS defaulted to Compatibility, while Android's is defaulted to the
> new "Internal" storage?
> I found these inconsistencies while trying to troubleshoot why I couldn't
> simply use {{cdvfile://localhost/persistent/file.name}} for audio recording
> via the cordova-plugin-media plugin.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]