Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1489] applicationSupportDirectory references a folder that does not actually exist.

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionDuplicate
Resolution Date2014-12-10T18:43:15.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
LabelsTCSupportTriage
ReporterStephen Feather
AssigneeRadamantis Torres-Lechuga
Created2014-12-02T17:48:56.000+0000
Updated2016-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-applicationDataDirectory

Comments

  1. 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:
       var 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!');
         }
       
    3. Run it in a device. Please share your results with us. Best Regards
  2. Stephen Feather 2014-12-09

    see TIMOB-17458
  3. Ingo Muschenetz 2014-12-10

    Going to resolve as a duplicate of TIMOB-17458. We will fix that issue to address this one.

JSON Source