开发者

App Documents Folder on iPhone

开发者 https://www.devze.com 2023-04-03 06:14 出处:网络
I developed an app for iPhone. I\'m using a sqlite database that is sited on Library/ApplicationSupport/iPhoneSimulator/4.3/MyApp/D开发者_如何学运维ocuments. Everything work fine on the Simulator. Now

I developed an app for iPhone. I'm using a sqlite database that is sited on Library/ApplicationSupport/iPhoneSimulator/4.3/MyApp/D开发者_如何学运维ocuments. 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?


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

this is the path to your documents folder

0

精彩评论

暂无评论...
验证码 换一张
取 消