Page 1 of 1
iOS Simulator "documents" path...
Posted: Mon Sep 03, 2012 10:08 am
by paulsr
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
Re: iOS Simulator "documents" path...
Posted: Mon Sep 03, 2012 10:47 am
by endernafi
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
Re: iOS Simulator "documents" path...
Posted: Mon Sep 03, 2012 10:57 am
by paulsr
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
Re: iOS Simulator "documents" path...
Posted: Mon Sep 03, 2012 3:55 pm
by CALL-151
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
Re: iOS Simulator "documents" path...
Posted: Tue Sep 04, 2012 12:10 am
by paulsr
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