Page 2 of 2

Re: IOS and FTP

Posted: Wed Mar 07, 2012 7:28 pm
by jacque
Nakia wrote:Update,

It seems to just be when using run mode in LC.
If I now run in simulator it is updating fld "temp" with progress as described in the release notes..

Thanks for your help everyone.

P.s. I could still use an explanation of why I should be using the cache folder in place of documents so I can avoid pain when I submit this to apple for app store approval..
Right, I didn't catch that you were running in the IDE. Most of the commands and functions you see in the iOS release notes are mobile-only. There are some places where you need to branch your code depending on whether the environment is "mobile" or not; some commands will not only fail, they'll throw errors in the IDE.

Regarding Documents and Cache folders: Documents are for permanent, user-generated content that can't be replaced by the app and which need to be backed up. User preferences fall into this category, for example, or any files the user creates themselves, such as files created by a notetaking app. The cache folder is for transient data that doesn't need saving, or any data that can be re-generated by the app. For example, one of my apps writes Help files to the cache folder because if the files are deleted by the OS they can easily be regenerated again. With the release of iCloud, which backs up the documents folder, Apple has become strict about the use of that folder and will reject your app if you store transient data there that doesn't need to be backed up. If you are storing your file only for the purpose of sending it to the server, then it belongs in cache. If the file contains user-generated data (scores, for example) that needs to be backed up to iCloud, then it should go into documents.

Re: IOS and FTP

Posted: Wed Mar 07, 2012 9:05 pm
by monte
Unless of course you use mergXattr to set the extended file attributes :-)

Re: IOS and FTP

Posted: Thu Mar 08, 2012 12:14 am
by Nakia
The file is user generated data that needs to be referenced throughout several times through out the App so I will keep it in the documents folder for now. Sending that file is a secondary process but still keeps the file there for the app to read so I do think it would be best kept in the documents folder..

Correct?