Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27458] Parity: Ti.Filesystem.getFile inconsistent in support of various URIs across platforms

GitHub Issuen/a
TypeBug
PriorityHigh
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 8.2.0
Fix Version/sn/a
ComponentsiOS
LabelsengSchedule
ReporterChristopher Williams
AssigneeUnknown
Created2019-10-09T14:54:15.000+0000
Updated2019-10-09T14:54:16.000+0000

Description

Between iOS and Android, we have very inconsistent support for various URIs we can pass in to refer to files. Some of this is expected, as Android has platform specific content:, appdata-private:, android.resource:, and file:///android_asset schemes. However, there's many differences in handling file: URIs, app: URIs, and paths with no scheme. Specifically in calling Ti.Filesystem.getFile(): - iOS does not seem to support using app: URIs. (A workaround would be to call Ti.App.appURLToPath() on it first? Which is an undocumented public API!) - Android doesn't support file:// or file: URIs for relative paths and assumes/forces absolute - iOS can't handle file: URIs (no trailing double-slash on the scheme) - Android assumes appdata-private: scheme implicitly if not scheme is provided See the test suite here: https://github.com/appcelerator/titanium_mobile/blob/6f176428755144db135986b281d08430fd036692/tests/Resources/ti.filesystem.file.addontest.js

Comments

No comments

JSON Source