I am attempting to create a 'start over' function in an iPhone application, but I cannot get a plist file to delete with the following code
- (IBAction)startOver:(id)sender {
NSFileManager *fileManager = [NSFileManager defaultManager];
[fileManager removeItemAtPath:@"data.plist" error:NULL];
UIViewController *controller = [self.storyboard instantiateViewControllerWithIdentifier:@"welcome"];
[self presentViewController:controller animated:YES completion:nil];
}
Can anybody see why?
Thanks.