[AC-1489] applicationSupportDirectory references a folder that does not actually exist.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2014-12-10T18:43:15.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | TCSupportTriage |
Reporter | Stephen Feather |
Assignee | Radamantis Torres-Lechuga |
Created | 2014-12-02T17:48:56.000+0000 |
Updated | 2016-03-08T07:37:56.000+0000 |
Description
Problem
Documentation lists applicationSupportDirectory as a constant available within the Ti.Filesystem namespace. Apple doesn't seem to be creating this folder for us any more? If you query the constant using getApplicationSupportDirectory(), it will dutifully return a string referencing a folder that does not actually exist.Expectation
That if the documentation references a constant for a folder in which a developer is supposed to be able to write files, the folder actually exists. Apple folder references and suggested practices (see Library) https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html Appcelerator documentation http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Filesystem-property-applicationDataDirectoryComments
- Mauro Parra-Miranda 2014-12-09
Hello [~sfeather]!
Do you mind running this code?
1. Create a new mobile project (classic titanium)
2. Replace app.js with this code:
3. Run it in a device. Please share your results with us. Best Regardsvar txt = Ti.Filesystem.getApplicationSupportDirectory(); Ti.API.info(txt); var file = Ti.Filesystem.getFile(Ti.Filesystem.applicationSupportDirectory, "hello.txt"); // Save file file.write("hello.txt"); // Debug: Test if file exist now if(file.exists) { Ti.API.info('[saveFile] Saved: YES! (' + file.nativePath + ')'); } else { Ti.API.info('[saveFile] Saved: NO!'); }
- Stephen Feather 2014-12-09 see TIMOB-17458
- Ingo Muschenetz 2014-12-10 Going to resolve as a duplicate of TIMOB-17458. We will fix that issue to address this one.