0

I developed an app for iPhone. I'm using a sqlite database that is sited on Library/ApplicationSupport/iPhoneSimulator/4.3/MyApp/Documents. Everything work fine on the Simulator. Now i followed this guide (http://stackoverflow.com/questions/246422/how-can-i-deploy-an-iphone-application-from-xcode-to-a-real-iphone-device) to add my app on my iPhone. The problem is that the App doesn't load data from the database, where have i to site my database on the iPhone? Where is and how can i reach the right folder?

Lazza87
  • 21
  • 2
  • Possible duplicate: http://stackoverflow.com/questions/6198747/create-copy-of-database-in-iphone/6198926#6198926 – rptwsthi Sep 08 '11 at 09:12

1 Answers1

1
NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *sDocumentsDir = [documentPaths objectAtIndex:0];

this is the path to your documents folder

jussi
  • 2,166
  • 1
  • 22
  • 37
  • How can i use it? Do i have to add manually my sqlite db there? Or have i to set it by code? (Sorry if it's a stupid question but i'm newbie!) – Lazza87 Sep 08 '11 at 09:05