iOS Simulator "documents" path...

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
paulsr
Posts: 222
Joined: Thu Jul 19, 2012 9:47 am
Contact:

iOS Simulator "documents" path...

Post by paulsr » Mon Sep 03, 2012 10:08 am

Greetings:

On my Mac, my documents special folder is /Users/paulr/Documents

But if I test an app on the iOS Simulator, this path gets changed to:

/Users/paulr/Library/Application Support/Simulator/5.1/Applications/long-hex-nbr/Documents

My question is: Does the "long-hex-nbr" part remain constant throughout the life of my testing of this app, or will it change when I least expect it?

TIA

--paul

endernafi
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 296
Joined: Wed May 02, 2012 12:23 pm
Contact:

Re: iOS Simulator "documents" path...

Post by endernafi » Mon Sep 03, 2012 10:47 am

Is it exactly long-hex-nbr or something like this 3DE34D29-EB76-449C-8892-FD752DC9F42B?
Just out of curiosity, but probably second one, right?

Anyways, it doesn't change until you delete your app via Finder or within iPhone Simulator.


Regards,

~ Ender Nafi Elekcioglu
~... together, we're smarter ...~
__________________________________________

macOS Sierra • LiveCode 7 & xCode 8

paulsr
Posts: 222
Joined: Thu Jul 19, 2012 9:47 am
Contact:

Re: iOS Simulator "documents" path...

Post by paulsr » Mon Sep 03, 2012 10:57 am

endernafi wrote:Is it exactly long-hex-nbr or something like this 3DE34D29-EB76-449C-8892-FD752DC9F42B?
Just out of curiosity, but probably second one, right?

Anyways, it doesn't change until you delete your app via Finder or within iPhone Simulator.


Regards,

~ Ender Nafi Elekcioglu
Yes, the second one. A long hex number with dashes.

I wasn't sure if it would change, so I'm glad to hear it won't!

Thanks...

--paul

CALL-151
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 206
Joined: Wed Oct 20, 2010 11:00 am

Re: iOS Simulator "documents" path...

Post by CALL-151 » Mon Sep 03, 2012 3:55 pm

True, but your question implies that you're hard coding a file path with that, which will fail when you put your app on a real device. Just use specialFolderPath("documents"), or something like:

Code: Select all

put the documents folder into tDocumentPath

paulsr
Posts: 222
Joined: Thu Jul 19, 2012 9:47 am
Contact:

Re: iOS Simulator "documents" path...

Post by paulsr » Tue Sep 04, 2012 12:10 am

CALL-151 wrote:True, but your question implies that you're hard coding a file path with that, which will fail when you put your app on a real device. Just use specialFolderPath("documents"), or something like:

Code: Select all

put the documents folder into tDocumentPath
Thanks, but no, I wanted to put some files into the documents folder, for testing.

--paul

Post Reply