Why are some delegate methods not called automatically? I thought that if you used a delegate method that it would be called automatically. But That’s not the case as I’ve found out. For an example see this post
Why are some delegate methods not called automatically? I thought that if you used
Share
In the case you mentioned, the method
didUpdateHeadingisn’t called because the manager itself hasn’t started yet. Basically, your controller is already listening for notifications, but the notifications don’t even exist yet because the location manager hasn’t been started. As soon as the manager is instructed to begin tracking user location, then the delegate methods will be called.So in your example, you placed the
startUpdatingHeadingcall inside the method that would be called once your manager is started. So, it never gets called.