Specialfolder problem in iphone

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
info26
Posts: 47
Joined: Tue May 17, 2011 10:14 am

Specialfolder problem in iphone

Post by info26 » Thu Jul 07, 2011 3:04 pm

I already posted another discussion like this, but the problem persists.
Summarize, I need the database file of my application is in a location accessible by other modules of the same application. The function specialfonders ("documents") creates a folder "documents" within each application.
Some say that the folder "documents" is not within the application, but if you go in the folders dell'iPhoneSimulatror you will find that is so, and even other software to navigate the iPhone is to see the files' inside of each application.
Now I'm developing the second module of my application and I would like to access the data as the first module to contain the client records, and if I use the command specialfolders ("documents") the file does not exist and creates a new, empty without tables.
There is no way to reach the other file

Do you have suggestions?

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Specialfolder problem in iphone

Post by Klaus » Thu Jul 07, 2011 3:25 pm

Hi info26,

I am not sure, but after reading the iOS Release notes, it sounds like
specialfolderpath("library")
should work for you!

I may be wrong, but is worth a try :)


Best

Klaus

Jellicle
Posts: 453
Joined: Thu Feb 24, 2011 11:07 am

Re: Specialfolder problem in iphone

Post by Jellicle » Fri Jul 08, 2011 2:04 am

Each iOS app lives in it's own sandbox on the device. Within that sandbox is the binary (the app file itself) and at least 2 folders that are created by default: Documents and Library. specialfolder("Documents") does not create a folder - it just gives you the path to the folder.

Note that those folders are not *in* the app, they are in the same directory as the app on the device/simulator. The contents of both those folder should be accessible from anywhere in the app, so I'm confused by your question. Can you try explaining again?
14" MacBook Pro
Former LiveCode developer.
Now recovering.

info26
Posts: 47
Joined: Tue May 17, 2011 10:14 am

Re: Specialfolder problem in iphone

Post by info26 » Fri Jul 08, 2011 7:55 am

Maybe I have not explained properly, certainly an application can use its own folder "documents" but that is not accessible from another application.

I have two applications that should read the same database file, and if the first saves it in its own folder "documents", how do I do read and write from another

The folder "Library" is readable and writable by all applications?

thanks

Jellicle
Posts: 453
Joined: Thu Feb 24, 2011 11:07 am

Re: Specialfolder problem in iphone

Post by Jellicle » Fri Jul 08, 2011 1:59 pm

I don't believe you can share data between 2 apps. From the iOS release notes:

"the iPhoneOS imposes strict controls over what you can and cannot access. Each application in iPhoneOS is stored in its own 'sandbox' folder (referred to as the home folder. An application is free to read and write files within this folder and its descendants, but is not allowed to access anything outside of this."
14" MacBook Pro
Former LiveCode developer.
Now recovering.

Nikovash
Posts: 15
Joined: Thu Mar 24, 2011 7:38 am

Re: Specialfolder problem in iphone

Post by Nikovash » Sat Jul 09, 2011 6:23 am

a limitation of the iOS environment is that each apps "sandbox" is a paradise for themselves only... meaning you can't write multiple apps to have a common sandbox. you could just try downloading this DB you are referencing from a server you have and just have all the apps Get or Post to a unique spot.

info26
Posts: 47
Joined: Tue May 17, 2011 10:14 am

Re: Specialfolder problem in iphone

Post by info26 » Sat Jul 09, 2011 9:51 am

Thank's for all

It is that i supose. Each application run in your own paradise


Thank's

Post Reply