0

You can get the path of an application with [[NSBundle mainBundle] bundlePath]. This method returns:

/var/mobile/Applications/3204358E-3076-46D7-9E3B-6D4CF021EF5A/myApp.app

but I need to extract the full path of document directory:

File://localhost/private/var/mobile/Applications/3204358E-3076-46D7-9E3B-6D4CF021EF5E/

Is that File://localhost/private/ is constant ? If no, how can I get this path ?

va05
  • 327
  • 1
  • 15
Anthony
  • 2,801
  • 3
  • 30
  • 49
  • `/var/mobile/Applications/3204358E-3076-46D7-9E3B-6D4CF021EF5A/myApp.app` is the full file-system path. What are you trying to do with it (and which API are you using for that)? – Thilo Jan 17 '12 at 10:02
  • Because when I use the no full path to use a `UIDocumentInteractionController` to open a pdf file in my app folder, it doesn't work, the application crash. I don't have this problem with full path – Anthony Jan 17 '12 at 10:08
  • Is the file in your Applications resources folder, [look here.](http://stackoverflow.com/questions/6387915/how-to-get-file-path-in-iphone-app) Library or documents folder, [look here](http://stackoverflow.com/questions/3762941/getting-an-ios-applications-library-path-reliably). – Raunak Jan 17 '12 at 14:01

0 Answers0