iPad: Create a logfile that gets continuously updated?
I want to create a file for my logs. But how can I continue on writing logs into one single file? For the first use I create the file and save my first log in it. But how can I continue on writing on this file without deleting the previous log messages?
NSFileHandle *h = [NSFileHandle fileHandleForWritingAtPath:@"MyFile.log"]; [h seekToEndOfFile]; // log [h writeData:[@"Hello World! 2nd time" dataUsingEncoding:NSUTF8StringEncoding]]; // close when not needed anymore [h closeFile];