In my application i got latitude and longitude.Now on a click on a button i have to upload this co-ordinates into server. If i want to upload a position i have to upload a txt file containing the coordinates in the described format. The text file have to be upload as a Base64 coded stream like a picture file, e.g. jpg or png.
Here is my code:
NSDate* date = [NSDate date];
NSDateFormatter* formatter = [[NSDateFormatter alloc] init];
[formatter setDateFormat:@"yyyy-MM-dd HH:MM:SS"];
str = [formatter stringFromDate:date];
lg= [NSString stringWithFormat:@"Lattitude is: %.8f", coord.longitude];
ls= [NSString stringWithFormat:@"Longitude is: %.8f", coord.latitude];
valueString=[NSString stringWithFormat:@"%@ \n %@ \n %@",lg,ls,str];