Jump to content
Leo Lui

Error when IOS location service is not authorised

Recommended Posts

 

I submitted my iOS app to App store but rejected. The reason is my app prompts error when user refuse allow the location service. I test this scenario and found that if user not authorise the location service when first installing the app, it would have a dead loop prompting error “ Unauthorized to user location services”. My app stuck there and cannot proceed further. I discovered the reason for the dead looping. I start the location sensor (LocationSensor.Active := True) when the application started. Due to unknown reason, may be network problem, it cannot send back any location data some time. I followed suggestion on the Stack Overflow to put the LocationSensor.Active := True in a timer event, keep looping until location data coming out. This method works quite good. However, this method is not really detecting the location service is on/off, it just working when the sensor has some delay in reading location data. Is there a function to detect the iOS location service is on or off  ?

 

 

B.R.

Leo

Edited by Leo Lui

Share this post


Link to post

I have this problem too. When discovery please post here.

 

Estou com esse problema também. Poderia me passar seu contato?

Share this post


Link to post
On 1/29/2021 at 12:40 AM, Leo Lui said:

Is there a function to detect the iOS location service is on or off  ?

 

uses
  iOSapi.CoreLocation;

if TCLLocationManager.Create.locationServicesEnabled then
  // Location services are enabled

 

Share this post


Link to post
On 1/29/2021 at 12:40 AM, Leo Lui said:

Is there a function to detect the iOS location service is on or off  ?

 

uses
  iOSapi.CoreLocation;

if TCLLocationManager.Create.locationServicesEnabled then
  // Location services are enabled

 

  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×