I've tried to lookup for answers on the Internet but I have found nothing that could help me.
Basically I have these restaurants that I want to save in a file and late read it. I save all the objects in an array for different uses later.
self.navigationItem.title = @"Restaurant Guide";
Restaurant *restaurant1 = [Restaurant new];
restaurant1.name=@"name1";
restaurant1.mark=@"1";
restaurant1.review=@"good";
Restaurant *restaurant2 = [Restaurant new];
restaurant2.name=@"name2";
restaurant2.mark=@"2";
restaurant2.review=@"bad";
restaurants = [NSArray arrayWithObjects:restaurant1, restaurant2, nil];
[restaurants writeToFile:(@"restaurantlist") atomically:NO];
But I figured if I do writetofile it won't work because it's not some strings, it's some objects. So how could I proceed?
Thank you