Hi all,
i've a class (downloaded from internet) that read a value of a file in this way (and after split the file):
NSArray* array = [fileContents componentsSeparatedByCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
where fileContents is my fullpathoffile.
in which way i must write my string? i'm trying with this:
NSString *data = [NSString stringWithFormat:@"%@,%@""\n", latitudine.text, longitudine.text];
NSFileHandle *handle;
handle = [NSFileHandle fileHandleForWritingAtPath: [self dataFilePath] ];
[handle truncateFileAtOffset:[handle seekToEndOfFile]];
[handle writeData:[data dataUsingEncoding:NSUTF8StringEncoding]];
i'm going crazy :D Any helpS?!?