Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14364] iOS7: setRemoteBackup(false) causes exception to be thrown if file or directory not found

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-08-28T20:04:45.000+0000
Affected Version/sn/a
Fix Version/s2013 Sprint 18, 2013 Sprint 18 API
ComponentsiOS
Labelsios7, iphone, ipod
ReporterInvestis Ltd
AssigneeIngo Muschenetz
Created2013-06-25T04:40:11.000+0000
Updated2017-03-21T21:35:25.000+0000

Description

*Problem* If the application is meant to set remote backup to false to any directory or file the app throws an exception with no file or directory found *Sample code*
Titanium.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory).setRemoteBackup(false);
*Error log*
[INFO] {
	    backtrace = "#0 () at :0";
	    line = 1;
	    message = "Error setting remote backup flag:";
	    nativeLocation = "-[TiFilesystemFileProxy setRemoteBackup:] (TiFilesystemFileProxy.m:494)";
	    nativeReason = "No such file or directory";
	    sourceId = 52725952;
	    sourceURL = "file:///var/mobile/Applications/DF166A0B-7A5B-45B6-907B-F2914B787511/Iberdrola%20IR.app/app.js";
	}
We assume that the code is unable to find the applicationDataDirectory and is neither able to write any files here.

Comments

  1. Investis Ltd 2013-07-11

    The problem is around the applicationdatadirectory/temporarydirectoy/caches directory. Files cannot be stored directly in this directories. Temporary workaround Make change in the /iphone/classes/FilesystemModule.m change @"file://localhost" to @"file://". Do not store files directly in those directories, instead create a sub directory and then store files. this will work and make your apps run on ios 7 until a proper solution is achieved. Regards Shakil Team Investis
  2. Investis Ltd 2013-08-14

    Post beta 5 this issue seems to have been resolved.
  3. Lee Morris 2017-03-21

    Closing ticket as the issue cannot be reproduced and due to the above comments.

JSON Source