Map and blue dot not displayed


#1

Hello, i’m at the very beginning of chapter 5. The problem I seem to be having is that the blue dot is not begin displayed, not only that my map doesn’t seem to be displayed either.
My connection in the XIB file seem to be correct but i’m at a loss as to the problem, can someone assist. Thanks.

#import <UIKit/UIKit.h>
#import <CoreLocation/CoreLocation.h>
#import <MapKit/MapKit.h>

@interface WhereamiViewController : UIViewController <CLLocationManagerDelegate, MKMapViewDelegate>
{
    CLLocationManager *locationManager;
    
    IBOutlet MKMapView *worldView;
    
    IBOutlet UIActivityIndicatorView *activityIndicator;
    IBOutlet UITextField *locationTitleField;
}
@end
#import "WhereamiViewController.h"
//#import "del.h"

@interface WhereamiViewController ()


@end

@implementation WhereamiViewController
-(id) initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    
    if (self) {
        // Create location manger object
        locationManager = [[CLLocationManager alloc] init];
      //__unused  del *location = [[del alloc] init];
        
        
        
        // There will be a warning from this line of code; ignore it for now
        [locationManager setDelegate:self];
        
        // And we want it to be as accurate as possible
        // regardless of how much time/power it takes
        [locationManager setDesiredAccuracy:kCLLocationAccuracyBest];
        
        //Tell our manager tostart looking for its location immediately
        
        // Don't need this line as it is implemented in MKMapView
        //[locationManager startUpdatingLocation];
                  
    }
    return self;
    
}


-(void) viewDidLoad
{
    NSLog(@"world view:set show user locatio");
     NSLog(@"%@", worldView);
    [worldView setShowsUserLocation:YES];
}

-(void) locationManager: (CLLocationManager *) manager
    didUpdateToLocation:(CLLocation *)newLocation 
           fromLocation:(CLLocation *)oldLocation
{
    NSLog(@"%@", newLocation);
}
-(void)mapView:(MKMapView *)mapView didUpdateUserLocation:(MKUserLocation *)userLocation
{
    CLLocationCoordinate2D loc = [userLocation coordinate];
    MKCoordinateRegion region = MKCoordinateRegionMakeWithDistance(loc, 250, 250);
    
    [worldView setRegion:region animated:YES];
     
}
-(void) locationManger:(CLLocationManager *)manager
        didFailWithError: (NSError *) error
{
    NSLog(@"Could not find location: %@", error);
}



-(void)dealloc
{
    //Tell the location manager to stop sending us message
    [locationManager setDelegate:nil];
}

@end

#2

I seem to have found the problem:-
In the iOS Simulator, I went to option:
iOS Simulator > Reset Content and Settings…

I recompiled,and it worked fine.