{ "id": "115947", "key": "TIMOB-14230", "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": "15499", "description": "2013 Sprint 13 API", "name": "2013 Sprint 13 API", "archived": true, "released": true, "releaseDate": "2013-07-01" }, { "id": "15111", "description": "2013 Sprint 13", "name": "2013 Sprint 13", "archived": true, "released": true, "releaseDate": "2013-07-01" }, { "id": "15576", "description": "2013 Sprint 16", "name": "2013 Sprint 16", "archived": true, "released": true, "releaseDate": "2013-08-12" }, { "id": "15578", "description": "2013 Sprint 16 API", "name": "2013 Sprint 16 API", "archived": true, "released": true, "releaseDate": "2013-08-12" } ], "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2013-07-30T20:04:58.000+0000", "created": "2013-06-14T10:53:39.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam" ], "versions": [], "issuelinks": [], "assignee": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-31T20:30:57.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": "h2. Problem description\r\nWhen a file is set NOT to be backed up (remoteBackup = false), it is not possible to turn it to true with an update of the app.\r\n\r\nh2. Steps to reproduce\r\n1) Create the following app\r\n\r\n{code}\r\nvar f = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, \"nobackup\");\r\nvar g = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, \"backupme\");\r\n\r\nif(f.exists()) {\r\n\talert(\"nobackup exists!\");\r\n} else {\r\n\tvar xhr = Ti.Network.createHTTPClient({\r\n\t\tonload: function() {\r\n\t\t\tvar f = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, \"nobackup\");\r\n\t\t\tf.write(this.responseData);\r\n\t\t\tf.setRemoteBackup(false);\r\n\t\t\t\r\n\t\t\talert(\"nobackup created\");\r\n\t\t}\r\n\t});\r\n\txhr.open(\"GET\", \"http://www.appcelerator.com.s3.amazonaws.com/web/home/carousels/home-platform.jpg\");\r\n\txhr.send();\t\r\n}\r\n\r\nif(g.exists()) {\r\n\talert(\"backupme exists!\");\r\n} else {\r\n\tvar xhr = Ti.Network.createHTTPClient({\r\n\t\tonload: function() {\r\n\t\t\tvar g = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, \"backupme\");\r\n\t\t\tg.write(this.responseData);\r\n\t\t\t\r\n\t\t\talert(\"backupme created\");\r\n\t\t}\r\n\t});\r\n\txhr.open(\"GET\", \"http://www.appcelerator.com.s3.amazonaws.com/web/home/carousels/home-platform.jpg\");\r\n\txhr.send();\t\r\n}\r\n{code}\r\n\r\n2) Run the app: you will get the messages 'backupme created' and 'nobackup created'.\r\n\r\n3) Connect the iPhone to iTunes\r\n\r\n4) Backup the device\r\n\r\n5) Restore the device\r\n\r\n6) Run the app again: now you get 'backupme exists' and 'nobackup created'\r\n\r\n7) Update the app to look like:\r\n\r\n{code}\r\nif(f.exists()) {\r\n\talert(\"nobackup exists!\");\r\n\tf.setRemoteBackup(true);\r\n} else {\r\n\tvar xhr = Ti.Network.createHTTPClient({\r\n\t\tonload: function() {\r\n\t\t\tvar f = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, \"nobackup\");\r\n\t\t\tf.write(this.responseData);\r\n\t\t\tf.setRemoteBackup(true);\r\n\t\t\t\r\n\t\t\talert(\"nobackup created\");\r\n\t\t}\r\n\t});\r\n\txhr.open(\"GET\", \"http://www.appcelerator.com.s3.amazonaws.com/web/home/carousels/home-platform.jpg\");\r\n\txhr.send();\t\r\n}\r\n\r\nif(g.exists()) {\r\n\talert(\"backupme exists!\");\r\n} else {\r\n\tvar xhr = Ti.Network.createHTTPClient({\r\n\t\tonload: function() {\r\n\t\t\tvar g = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, \"backupme\");\r\n\t\t\tg.write(this.responseData);\r\n\t\t\t\r\n\t\t\talert(\"backupme created\");\r\n\t\t}\r\n\t});\r\n\txhr.open(\"GET\", \"http://www.appcelerator.com.s3.amazonaws.com/web/home/carousels/home-platform.jpg\");\r\n\txhr.send();\t\r\n}\r\n{code}\r\n\r\n8) Update the app on the device\r\n\r\n9) Run the app: you will get once again 'backupme exists' and 'nobackup created'\r\n\r\n10) Repeat the backup and restore steps\r\n\r\n11) Run the app after the restore: again you get 'nobackup created'\r\n\r\n\r\nh2. Expected result\r\n\r\nSince the remoteBackup property for the file has been changed, both file should exist after the restore.", "attachment": [], "flagged": false, "summary": "iOS: cannot change remoteBackup property after updating the app", "creator": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "environment": "iOS 6\r\nSDK 3.1.0", "comment": { "comments": [ { "id": "260425", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Cannot reproduce the issue on actual icloud backup. \n\nThis ticket should be actually marked as invalid as the testing instructions provided is invalid. \n\nthe remoteBackup flag is to control what files are backed up to the cloud and not locally to the computer. \nNone the less following the steps provided in the ticket also i was not able to reproduce the issue. \n\nMarking as cannot reproduce for now.\n\nTested on iPad runnign 6.0 and TiSDK 3.1.1.GA build iOS SDK 6.1", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-01T16:16:33.000+0000", "updated": "2013-07-01T16:16:33.000+0000" }, { "id": "263997", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Testing with the latest 3.1.X build using the latest Xcode 5 DP 4 and could not reproduce the issue . It would as expected.\n\nBuild the app using the first code. Opened it backed it up.\nRestored from backup . opened the app.. observerd behavior as expected.\nRebuild the app using the second test case. open app.\nBackedup the device. Restore the device from app.\nOpened the app and saw both files in the documents folder of the app. (verified the files exist using another tool)\n\nSo i cannot reproduce the fail case anymore.\n", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-30T19:19:20.000+0000", "updated": "2013-07-30T19:19:20.000+0000" }, { "id": "409837", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Cannot reproduce this issue, tested with the following environment;\r\niPhone 7 and Simulator (10.2)\r\nMacOS 10.11.6 (15G31)\r\nStudio 4.8.1.201612050850\r\nTi SDK 6.0.2 GA\r\nAppc NPM 4.2.8\r\nAppc CLI 6.1.0\r\nTi CLI 5.0.11\r\nAlloy 1.9.5\r\nArrow 1.10.1\r\nXcode 8.2 (8C38)\r\nNode v4.6.0\r\nJava 1.7.0_80", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-08T17:30:11.000+0000", "updated": "2017-03-08T17:30:11.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }