Hi, I have a problem with a NSData writeToFile. I have implemented the code below but i have an anomaly. When i run my program on the simulator, the new file is created and the informations are stored; when i build the app in my device , the file isn't created. The debug don't give me any error but don/t save anything. Can you help me? Thanks so much and sorry for my english.
-(void)saveXML:(NSString*)name:(float)x:(float)y:(float)z{
    NSMutableData *data = [NSMutableData data];
    NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:data];
    [archiver setOutputFormat:NSPropertyListXMLFormat_v1_0];
    [archiver encodeFloat:x forKey:@"x"];
    [archiver encodeFloat:y forKey:@"y"];
    [archiver encodeFloat:z forKey:@"z"];
    [archiver encodeObject:name forKey:@"name"];
    [archiver finishEncoding];
    BOOL result = [data writeToFile:@"XML Position" atomically:YES];
    if(result)
        [self   updateTextView:@"success"];
    [archiver release];
}