{ "id": "121331", "key": "TIMOB-15513", "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": "15707", "description": "2013 Sprint 23", "name": "2013 Sprint 23", "archived": true, "released": true, "releaseDate": "2013-11-15" }, { "id": "15708", "description": "2013 Sprint 23 API", "name": "2013 Sprint 23 API", "archived": true, "released": true, "releaseDate": "2013-11-15" } ], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2013-10-24T21:15:46.000+0000", "created": "2013-10-17T17:41:19.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "ios7", "supportTeam" ], "versions": [ { "id": "15593", "description": "Release 3.1.3", "name": "Release 3.1.3", "archived": true, "released": true, "releaseDate": "2013-09-18" } ], "issuelinks": [ { "id": "32782", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "121597", "key": "TIMOB-15577", "fields": { "summary": "iOS: Disallow snapshot of app appearing on app resume", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-21T18:12:24.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": "h6.Issue description\r\nDeveloper is seeing this error on iOS 7 only. When he attempts to write the data to a file object. iOS 6 does not seem to be affected, location is below:\r\n\r\n{quote}\r\nvar snapFolder = Ti.Filesystem.getFile(Ti.Filesystem.applicationSupportDirectory, \"../Caches/Snapshots\");\r\n{quote}\r\n\r\nh6.Snippet code\r\nOn this particular use case, on iOS 7, the Snapshots directory is still present. It seems like the delete step did not work although the error message seems to indicate the write step failing.\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor : 'white',\r\n\torientationModes : [Ti.UI.PORTRAIT]\r\n});\r\nwin.open();\r\n\r\nvar label = Ti.UI.createLabel({\r\n\ttext : 'No app event received. Make call while running app',\r\n\ttextAlign : 'center',\r\n\twidth : 'auto'\r\n});\r\nwin.add(label);\r\n\r\nTitanium.App.addEventListener('pause', function() {\r\n\t// this will delete the Snapshots folder and create a file in its place\r\n\t// so that the folder cannot be recreated\r\n\tvar snapFolder = Ti.Filesystem.getFile(Ti.Filesystem.applicationSupportDirectory, \"../Caches/Snapshots\");\r\n\tsnapFolder.deleteDirectory(true);\r\n\tsnapFolder.write(\"No Folder for you!\");\r\n\tlabel.text = \"App has been paused\";\r\n});\r\n\r\nTitanium.App.addEventListener('resume', function(e) {\r\n\tlabel.text = \"App has resumed\";\r\n}); \r\n{code}\r\n\r\nh6.Console logs\r\n{code}\r\nOct 17 09:08:43 QA291-iphone-5s App-Phone[558] : [ERROR] Could not write data to file at path \"/var/mobile/Applications/9C33C952-64EA-4F11-83B2-FC7513DCC1AS/Library/Caches/Snapshots\" - details: Error Domain=NSCocoaErrorDomain Code=513 \"The operation couldn’t be completed. (Cocoa error 513.)\" UserInfo=0x19086c00 {NSFilePath=/var/mobile/Applications/9C33C952-64EA-4F11-83B2-FC7513DCC1AS/Library/Caches/Snapshots, NSUnderlyingError=0x17eb2fc0 \"The operation couldn’t be completed. Operation not permitted\"}\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS7: Write data to file couldn't be completed in Ti.Filesystem.applicationSupportDirectory", "creator": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK 3.1.3.GA\r\niOS 7", "comment": { "comments": [ { "id": "276684", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-10-24T21:15:46.000+0000", "updated": "2013-10-24T21:15:46.000+0000" }, { "id": "414258", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue will not fix.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-21T18:12:24.000+0000", "updated": "2017-03-21T18:12:24.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }