Page 1 of 1

documents folder is empty

Posted: Mon Oct 01, 2012 6:58 pm
by jmburnod
Hi All
I add a folder in the copy files pan of the standalone setting but the documents folder is empty in the device after i uploaded the app.
What I forget ?
I use LC 5.02 and xCode 4.2.1
Jean-Marc

Re: documents folder is empty

Posted: Mon Oct 01, 2012 7:22 pm
by gpb01
Hi,
probably your folder is located into the special folder "engine" (Read ONLY).

From dictionary : "engine - The folder containing the built standalone engine (i.e. the bundle). This is useful for constructing paths to resources that have been copied into the bundle at build time."

Guglielmo

Re: documents folder is empty

Posted: Mon Oct 01, 2012 7:53 pm
by jmburnod
Hi,

Thank for your reply but for me a folder added in the copy files pan will be copied in the documents folder of the sandbox.
I'm right ?

Best regards

Jean-Marc

Re: documents folder is empty

Posted: Mon Oct 01, 2012 8:52 pm
by Klaus
Bonsoir Jean-Marc,
jmburnod wrote:Hi,
Thank for your reply but for me a folder added in the copy files pan will be copied in the documents folder of the sandbox.
I'm right ?
No :D

Everything you add in the "copy files" section will be found in -> specialfolderpath("engine") on the device. No automatisms here!
You, the developer, need to take care of this, means you need to copy that folder resp. its content to -> specialfolderpath("documents")


Best

Klaus

Re: documents folder is empty

Posted: Mon Oct 01, 2012 10:45 pm
by jmburnod
Hi gpb01 and Klaus,

Sorry i am wrong, I was sur i used this way to copy file in the documents folder. :oops:
I must to find an other way

Best regards

Jean-Marc

Re: documents folder is empty

Posted: Tue Oct 02, 2012 7:47 am
by gpb01
Hi Jean-Marc,
you have different solutions ...

1. on startup, the first time, you can copy your folder from the "engine" folder into the "document" folder

2. you can set the "document sharing" flag and you can access the "document" folder from iTunes

3. you can trasfer file into the "document" folder from the network (e.g. FTP, Dropbox, ...)

... and don't forget the Apple rules for the "document" folder or ... your App will be rejected ;)

Guglielmo

Re: documents folder is empty

Posted: Tue Oct 02, 2012 3:16 pm
by jmburnod
Ciao Guglielmo,

And thank for your help.
I need a lot of files in the documents folder, essentially pictures and sound files (rrenarrator don't work in french)
more less 200 Mo. I think copy file from the engine folder is not a good way.

ITunes and network ways are probably better.

I'm interested to know where i can see the Apple rules for the "document" folder
Do you have an URL for that ?

Best regards

Jean-Marc

Re: documents folder is empty

Posted: Tue Oct 02, 2012 4:57 pm
by gpb01
Bonsoir Jean-Marc,

on "File System Basics" http://developer.apple.com/library/ios/ ... rview.html, under the section "iOS Standard Directories: Where Files Reside" and "Where You Should Put Your App’s Files" you will find some info.

The problem is that Apple want to avoid large backups on iCloud and, because the user can choose to backup his data on iCloud, Apple reject the App which store a large amount of data on the "document" directory (tipical reject reason is : We found that your app does not follow the iOS Data Storage Guidelines, which is not in compliance with the App Store Review Guidelines).

You have two solution :

1. Use the "library" directory, which is still backuped by iTunes, but not on iClaud.

2. Use the "document" directory, setting for the files the "do not back up" attribute (see the File Attributes, iphoneSetDoNotBackupFile, on LiveCode iOS release notes).

Hope this help,

Guglielmo

Re: documents folder is empty

Posted: Tue Oct 02, 2012 6:08 pm
by jmburnod
Ciao Guglielmo,
Hope this help,
Yes, of course
Thanks a lot

Jean-Marc

Re: documents folder is empty

Posted: Sat Oct 06, 2012 3:57 pm
by jmburnod
Hi,
I am confused with the copy file pan. :?
I added a folder in the copy file pan and i see it in the documents folder.
I used the same version of liveCode 5.0.2 and xCode 4.2.1

Jean-Marc

Re: documents folder is empty

Posted: Sat Oct 06, 2012 4:02 pm
by gpb01
jmburnod wrote:Hi,
I am confused with the copy file pan. :?
I added a folder in the copy file pan and i see it in the documents folder.
I used the same version of liveCode 5.0.2 and xCode 4.2.1

Jean-Marc
Hi Jean-Marc,
a little more details would be better ...

In which copy file pan ? LiveCode ? iTunes ?

Where you see the file ? In the Simulator ? In the real device ?

Guglielmo

Re: documents folder is empty

Posted: Sat Oct 06, 2012 4:09 pm
by jmburnod
Hi Guglielmo,
Thank a lot for the reply
In which copy file pan ? LiveCode ? iTunes ?

In LiveCode
Where you see the file ? In the Simulator ? In the real device ?
In the organizer window of xCode

Jean-Marc

Re: documents folder is empty

Posted: Sat Oct 06, 2012 4:51 pm
by Klaus
Bonsoir Jean-Marc,

well, if you or (an erlier version of) your app did NOT do this, then this is clearly a case of MAGIC! :D
No, honestly, this does NOT happen automatically, never!


Best

Klaus

Re: documents folder is empty

Posted: Sat Oct 06, 2012 5:35 pm
by jmburnod
Guten Abend Klaus,
I tried the same with LC 5.5.2 and the folder documents is empty as expected
I did also an other try with 5.0.2 and the folder documents is empty as expected

Ok i understand i must give up this way

Best

Jean-Marc