{ "id": "162245", "key": "TIMOB-23698", "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": "17706", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-08-01T01:26:30.000+0000", "created": "2016-07-28T20:05:42.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "qe-5.4.0" ], "versions": [ { "id": "17706", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" } ], "issuelinks": [ { "id": "52289", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "159268", "key": "TIMOB-23141", "fields": { "summary": "iOS: Ti.Filesystem.File.remoteBackup = true doesn't (re)include file to be backed up", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-08-01T17:24:41.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": "*Details:* {{CFURLSetResourcePropertyForKey failed}} log appears when you use {{Ti.Filesystem.File.setRemoteBackup}}.\r\n\r\nHere is a related stackover [link| http://stackoverflow.com/questions/12928509/cfurlsetresourcepropertyforkey-failed-when-disable-data-backup-on-nsdocumentdire], which seems to be done in this [PR|https://github.com/appcelerator/titanium_mobile/pull/8093/files#diff-7c1c034158d43375ccc8ec33c21f4257R513] for TIMOB-23141.\r\n\r\n*Steps to reproduce:*\r\n# Create a classic mobile project: {{appc new --classic}}\r\n# In the app.js file, replace the code with this code:\r\n{code}\r\nvar useBackup = false;\r\n \r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: \"#fff\"\r\n});\r\n \r\nvar btn = Ti.UI.createButton({\r\n title: \"Toggle remote backhup\"\r\n});\r\n \r\nvar dir = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, \"test\");\r\n \r\nif (!dir.exists()) {\r\n Ti.API.info(\"### Recursive directory does not exist, yet\");\r\n \r\n var newDir = dir.createDirectory();\r\n if (!newDir) {\r\n Ti.API.error(\"### Root directory could not be created\");\r\n }\r\n else {\r\n for (var i = 0; i < 20; i++) {\r\n var tmp = Ti.Filesystem.getFile(dir.nativePath, \"subDirectory-\" + i);\r\n if (!tmp.createDirectory()) {\r\n Ti.API.error(\"### Subdirectory \" + i + \" could not be created!\");\r\n }\r\n else {\r\n Ti.API.warn(\"### Subdirectory \" + i + \" is created!\");\r\n }\r\n }\r\n \r\n var newFile = Ti.Filesystem.getFile(dir.nativePath, \"file.txt\");\r\n if (!newFile.write('i am a monkeylord')) {\r\n Ti.API.error(\"### File could not be created!\");\r\n }\r\n else {\r\n Ti.API.warn(\"### File is created!\");\r\n }\r\n }\r\n}\r\nelse {\r\n Ti.API.info(\"### Recursive directory already exists\");\r\n}\r\n \r\n// Ti.API.warn('### setting remoteBackup property to true');\r\n// dir.remoteBackup = true;\r\n \r\nbtn.addEventListener(\"click\", function() {\r\n useBackup = !useBackup;\r\n Ti.API.info('### useBackup ' + useBackup);\r\n dir.setRemoteBackup(useBackup);\r\n});\r\n \r\nwin.add(btn);\r\nwin.open();\r\n{code}\r\n# Install app to an iOS device\r\n# Press the *Toggle remote backhup* button\r\n\r\n*Actual:* The following log will appear:\r\n{code}\r\n[INFO] CFURLSetResourcePropertyForKey failed because it was passed an URL which has no scheme\r\n{code}\r\n\r\n*Expected:* No erroneous log should appear.", "attachment": [], "flagged": false, "summary": "iOS: \"CFURLSetResourcePropertyForKey failed\" log appears when you use Ti.Filesystem.File.setRemoteBackup", "creator": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "Appc CLI NPM: 4.2.7\r\nAppc CLI Core: 5.4.0-35\r\nArrow: 1.8.2\r\nSDK: 5.4.0.v20160727143921\r\nNode: v4.4.7\r\nOS: Mac OS X (10.11.6)\r\nXcode: 7.3.1\r\nDevice: iphone 5 (9.1)", "closedSprints": [ { "id": 685, "state": "closed", "name": "2016 Sprint 16 SDK", "startDate": "2016-07-30T00:40:02.939Z", "endDate": "2016-08-13T00:40:00.000Z", "completeDate": "2016-08-15T08:00:33.056Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "391964", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR here: https://github.com/appcelerator/titanium_mobile/pull/8168", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-07-29T08:56:09.000+0000", "updated": "2016-07-29T08:56:09.000+0000" }, { "id": "391968", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR (5_4_X): https://github.com/appcelerator/titanium_mobile/pull/8175", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-07-29T11:04:42.000+0000", "updated": "2016-07-30T13:08:52.000+0000" }, { "id": "392123", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed. Verified that the {{CFURLSetResourcePropertyForKey failed}} log does not appear when you use {{Ti.Filesystem.File.setRemoteBackup}} and files are still being backed up, i.e. the fix for TIMOB-23141 still works.\r\n\r\nTested on:\r\n\r\nAppcelerator Studio, build: 4.7.0.201607250649\r\nAppc CLI NPM: 4.2.7\r\nAppc CLI Core: 5.4.0-37\r\nArrow: 1.8.2\r\nSDK: 5.4.0.v20160801022303\r\nNode: v4.4.7\r\nOS: Mac OS X (10.11.6)\r\nDevices: iphone 6 plus (9.1)", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-08-01T17:24:30.000+0000", "updated": "2016-08-01T17:24:30.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }