Pankaj Kainthla
Pankaj Kainthla

Reputation: 2489

how to know the path of file in iphone sdk?

i want to connect database to iphone sdk but it is taking the default path inside the system folders but not in the app bundle ?how can i change the file path from that system directory to file in my app bundle?

Upvotes: 0

Views: 704

Answers (1)

Abramodj
Abramodj

Reputation: 5879

This should retrive your app's document folder path :

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

Upvotes: 1

Related Questions