Leo Lui 0 Posted January 28, 2021 (edited) 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 January 28, 2021 by Leo Lui Share this post Link to post
tiagoom 0 Posted November 8, 2021 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
Dave Nottage 557 Posted November 8, 2021 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
Dave Nottage 557 Posted November 8, 2021 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 1 Share this post Link to post