0

I have setup location to work on my project without no problem. I can get coordinates easily from didUpdateLocations. However, I realised that sometimes during the initial run (Xcode run), my didUpdateLocations function does not get fired at all even though all access is granted and the simulate location selection is selected (Simulator-> Location -> Debug -> Apple). Easy fix is that I select the Apple location again and everything runs again. I dont know if it is a bug or not?

Also, I want my app to be able to detect poor or no location signal didUpdateLocations ever get fired? Reason I am asking is because according to the following link, Inside didUpdateLocations, I can call location[0].horizontalAccuracy to detect zero signal. However, it would only work if this function DOES get fired when I have zero signal?

Xcode: How to show GPS strength value?

Community
  • 1
  • 1
user172902
  • 3,541
  • 9
  • 32
  • 75
  • quit the simulator and again run it. paste you code then will find the problem – HariKrishnan.P Jul 19 '16 at 14:42
  • It is not really a problem as I mentioned. I get no error. The program does not freeze, it just seems like no location is incomming even though everything is setup (I know the fact that everything is setup because I can simply start getting location as soon as I re-click Simulator-> Location -> Debug -> Apple (which was already chosen with a tick). – user172902 Jul 19 '16 at 15:00

1 Answers1

0

Try to enable location services for your application. Setting -> Privacy -> Location Services and set permissions for your app. Due to bug in Xcode this could happens every tine your install app. So the best choice is get real device. Of course, if you could afford this. Hope this helps.

Igor Kislyuk
  • 330
  • 1
  • 4
  • 14