0

I am using INTULocationManager (ios, swift) library for getting location in my app, and I often get error in getting location. The error which appears in log is this. The real issue is other apps like Uber are able to get current location.

Below is my code for getting location:

    var locMgr: INTULocationManager = INTULocationManager.sharedInstance()

    locMgr.requestLocationWithDesiredAccuracy(INTULocationAccuracy.Block,        
      timeout: timeInterval,
      delayUntilAuthorized: true,
      block: {(currentLoc: CLLocation!, achievedAccuracy: INTULocationAccuracy, status: INTULocationStatus) -> Void in

            if status == INTULocationStatus.Success {
               // got location successfully
            } else {
               // error, this happens often
            }
    })

Edit: I was able to solve it by constantly hitting the same request again in the failure block for upto 10 times. It is working much better now.

Community
  • 1
  • 1
Avnish Gaur
  • 489
  • 1
  • 4
  • 16

0 Answers0