Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6710377
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:00:52+00:00 2026-05-26T08:00:52+00:00

I am following the big nerd ranch guide book and have modified my app

  • 0

I am following the big nerd ranch guide book and have modified my app delegate.h to look like this:

   #import <UIKit/UIKit.h>
   #import <CoreLocation/CoreLocation.h>
   #import <MapKit/MapKit.h>
   @interface WhereamiAppDelegate : NSObject <UIApplicationDelegate,CLLocationManagerDelegate, MKMapViewDelegate>
   {   
       IBOutlet UITextField *locationTitleField;
       IBOutlet UIActivityIndicatorView *activityIndicator;
       IBOutlet MKMapView *worldView;
       CLLocationManager *locationManager;
   }
  @property (nonatomic, retain) IBOutlet  UIWindow *window;
  @property (nonatomic, retain, readonly) NSManagedObjectContext *managedObjectContext;
  @property (nonatomic, retain, readonly) NSManagedObjectModel *managedObjectModel;
  @property (nonatomic, retain, readonly) NSPersistentStoreCoordinator *persistentStoreCoordinator;
  - (void)saveContext;
  - (NSURL *)applicationDocumentsDirectory;
 @end

The .m looks like this:

 #import "WhereamiAppDelegate.h"
 @implementation WhereamiAppDelegate
 @synthesize window = _window;
 @synthesize managedObjectContext = __managedObjectContext;
 @synthesize managedObjectModel = __managedObjectModel;
 @synthesize persistentStoreCoordinator = __persistentStoreCoordinator;

 -(void)mapView:(MKMapView *)mapView didUpdateUserLocation:(MKUserLocation *)userLocation {

     CLLocationCoordinate2D loc = [userLocation coordinate];
     MKCoordinateRegion region = MKCoordinateRegionMakeWithDistance(loc, 250, 250);
     [worldView setRegion:region animated:YES];
     NSLog(@"didUpdateUserLocation is called");
  }
  - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  {
     // Override point for customization after application launch.

// Create location manager object
     locationManager = [[CLLocationManager alloc] init];
// There will be a warning from this line of code; ignore it for now
     [locationManager setDelegate:self];
// We want all results from the location manager
     [locationManager setDistanceFilter:kCLDistanceFilterNone];
// And we want it to be as accurate as possible
// regardless of how much time/power it takes
     [locationManager setDesiredAccuracy:kCLLocationAccuracyBest];
// Tell our manager to start looking for its location immediately
// [locationManager startUpdatingLocation];
     [worldView setShowsUserLocation:YES];
// This line may say self.window, don't worry about that
     [self.window makeKeyAndVisible];
     return YES;
 }
- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
 {
      NSLog(@"%@", newLocation);
 }
- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error
{
      NSLog(@"Could not find location: %@", error);
 }

When I open the app it should ZOOM into my location. But it doesn’t zoom, so i put an NSLog in the didUpdateUserLocation to see if it was called. But it was never printed, so it wasn’t called. How do I fix this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T08:00:53+00:00Added an answer on May 26, 2026 at 8:00 am

    Same thing happened to me…

        - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
        ...
        [worldView setDelegate:self];
        ...
    }
    

    Thks

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am following the Big Nerd Ranch iOS Programming Guide(3rd Edition), and have followed
I am following a book (Big Nerd Ranch IOS Programming) and the version of
I've been following Big Nerd Ranch's iOS Programming Guide (3rd Ed.) to set up
I have a html/php form like the following: Form 1: Apple options: -big -medium
Working off an idea from the Big Nerd Ranch guide to iOS programming, I'm
I'm reading through the Big Nerd Ranch book on iOS programming and I had
I am learning iOS programming through the Big Nerd Ranch guide by Hillegass and
For finding names in a big text I have the following regex ([A-Z][a-z]*)[\s-]([A-Z][a-z]*) This
I have a big list, but micro example would be like the following: A
I am following Big Nerd Ranch iOS Programming by Joe Conway and am kinda

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.