tags:

views:

27

answers:

1

I am developing an iPhone application and i need to log the information about the images selected by the user to an external log file. How can this be achieved in iPhone?

I use Objective c for developing the application. I am not able to find out , which image the user has selected and get that information and write to the log file.

A: 

You can use NSFileHandle to write to a file.

NSFileHandle* fh = [NSFileHandle fileHandleForWritingAtPath:@"path/to/logfile"];
[fh seekToEndOfFile];
[fh writeData:[@"This is written" dataUsingEncoding:NSUTF8StringEncoding]];
[fh closeFile];
tonklon