Jenya Kyrmyza
Jenya Kyrmyza

Reputation: 327

store and delete text file locally ios objective c

I'm new to ios(android) developer. Do you have some specific file storage in the app's sandbox where i can store or delete some additional files?

I need to write to file some logs of handled exceptions and then store them to server when starting the application. After successful delievery to server, i want to delete this log file, and create new one, and do it again and again.

Upvotes: 0

Views: 109

Answers (1)

fabe
fabe

Reputation: 718

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

Also consider NSDocumentDirectory and NSCachesDirectory.

Upvotes: 1

Related Questions