Project: titanium
Issue TIMOB-23698: iOS: "CFURLSetResourcePropertyForKey failed" log appears when you use Ti.Filesystem.File.setRemoteBackup
*Details:* {{CFURLSetResourcePropertyForKey failed}} log appears when you use {{Ti.Filesystem.File.setRemoteBackup}}. Here 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. *Steps to reproduce:* # Create a classic mobile project: {{appc new --classic}} # In the app.js file, replace the code with this code: {code} var useBackup = false; var win = Ti.UI.createWindow({ backgroundColor: "#fff" }); var btn = Ti.UI.createButton({ title: "Toggle remote backhup" }); var dir = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, "test"); if (!dir.exists()) { Ti.API.info("### Recursive directory does not exist, yet"); var newDir = dir.createDirectory(); if (!newDir) { Ti.API.error("### Root directory could not be created"); } else { for (var i = 0; i < 20; i++) { var tmp = Ti.Filesystem.getFile(dir.nativePath, "subDirectory-" + i); if (!tmp.createDirectory()) { Ti.API.error("### Subdirectory " + i + " could not be created!"); } else { Ti.API.warn("### Subdirectory " + i + " is created!"); } } var newFile = Ti.Filesystem.getFile(dir.nativePath, "file.txt"); if (!newFile.write('i am a monkeylord')) { Ti.API.error("### File could not be created!"); } else { Ti.API.warn("### File is created!"); } } } else { Ti.API.info("### Recursive directory already exists"); } // Ti.API.warn('### setting remoteBackup property to true'); // dir.remoteBackup = true; btn.addEventListener("click", function() { useBackup = !useBackup; Ti.API.info('### useBackup ' + useBackup); dir.setRemoteBackup(useBackup); }); win.add(btn); win.open(); {code} # Install app to an iOS device # Press the *Toggle remote backhup* button *Actual:* The following log will appear: {code} [INFO] CFURLSetResourcePropertyForKey failed because it was passed an URL which has no scheme {code} *Expected:* No erroneous log should appear.
Story points: 3