{ "id": "134207", "key": "TIMOB-17458", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "16723", "description": "Windows Platform Support, ListView updates, Vector overlays in maps", "name": "Release 4.1.0", "archived": false, "released": true, "releaseDate": "2015-07-08" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-03-16T16:37:29.000+0000", "created": "2014-08-06T00:10:30.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [ { "id": "43989", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "140812", "key": "AC-1489", "fields": { "summary": "applicationSupportDirectory references a folder that does not actually exist.", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-23T22:26:28.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Steps to reproduce:\r\n\r\n# Create a new Titanium application\r\n# Disable analytics is tiapp.xml\r\n# Attempt to write to the Ti.Filesystem.getApplicationSupportDirectory(). It will fail (as the directory does not exist).\r\n\r\nAnother way to confirm:\r\n\r\n{code}\r\nvar self = Ti.Filesystem.getApplicationSupportDirectory();\r\nconsole.log(self);\r\n[INFO] file:///Users/stephenfeather/Library/Application%20Support/iPhone%20Simulator/7.1/Applications/1E1EB9EC-2997-4FD2-8618-41E5EA522A54/Library/Application%20Support/\r\n{code}\r\n\r\nImmediate workaround is to create that folder manually, but it should be created automatically.\r\n", "attachment": [], "flagged": false, "summary": "iOS: ApplicationSupportDirectory is not created when analytics are disabled", "creator": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 362, "state": "closed", "name": "2015 Sprint 06 SDK", "startDate": "2015-03-14T13:56:53.868Z", "endDate": "2015-03-28T00:00:00.000Z", "completeDate": "2015-03-30T17:32:33.590Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "346019", "author": { "name": "ben.bahrenburg@gmail.com", "key": "ben.bahrenburg@gmail.com", "displayName": "Ben Bahrenburg", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR provided to create directory after boot in TiApp \r\n\r\nPR: https://github.com/appcelerator/titanium_mobile/pull/6729\r\nTest : https://gist.github.com/benbahrenburg/9adb20ded6e2fe218a11", "updateAuthor": { "name": "ben.bahrenburg@gmail.com", "key": "ben.bahrenburg@gmail.com", "displayName": "Ben Bahrenburg", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-03-15T19:20:53.000+0000", "updated": "2015-03-15T19:20:53.000+0000" }, { "id": "346058", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Test code:\r\n{code:javascript}\r\nvar dir = Ti.Filesystem.getApplicationSupportDirectory(); \r\nconsole.log(dir); \r\nvar f = Titanium.Filesystem.getFile(Ti.Filesystem.applicationSupportDirectory);\r\nconsole.log('Directory Exists: '+ (f.exists() ? 'Yes' : 'No'));\r\nconsole.log('Needs to be yes to pass'));\r\n \r\nvar testfile = Ti.Filesystem.getFile(Ti.Filesystem.applicationSupportDirectory, 'text.txt');\r\nif(testfile.exists()){\r\n\ttestfile.deleteFile();\r\n}\r\n \r\ntestfile.write(\"text written via write()\\n\");\r\nconsole.log(\"Check file at:\" + testfile.nativePath);\r\nconsole.log('content needs to be there to pass'));\r\n{code}\r\n\r\nSteps to verify\r\n \r\n1. Create a new ti project\r\n2. Before compiling turn off analytics\r\n4. Create a new app and paste the code", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-03-16T16:41:34.000+0000", "updated": "2015-03-16T16:43:05.000+0000" }, { "id": "415433", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing as fixed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-23T22:26:28.000+0000", "updated": "2017-03-23T22:26:28.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }