iOS Location Permission
Hi Folks
On Android, I ask for Location Permission like:
if (!Permission.HasUserAuthorizedPermission(Permission.FineLocation))
{
Permission.RequestUserPermission(Permission.FineLocation);
}
What is the way of doing the same thing for iOS. Basically, how to check if its already granted and how to ask for permission.
Thanks
Stefan
Fellows, I tried to google a lot, but could not find a suitable solution. Could anybody point me in the right direction?
$$anonymous$$uch appreciated!
Answer by halterstefan · Jun 30, 2019 at 07:41 PM
Anybody Help? Much appreciated.
Thanks!
If you are trying to get better accuracy via IOS applications you should look into modifying Xcode's Iphone_Sensors.mm file which is inside the Unity-Iphone>Classes>IPhone_Sensors.mm.
It should look like something this>
LocationServiceInfo::LocationServiceInfo() { locationStatus = kLocationServiceStopped; desiredAccuracy = kCLLocationAccuracy$$anonymous$$ilometer; distanceFilter = 500;
You can set distanceFilter to 5 or 10. I believe 10 is the $$anonymous$$imum to increase accuracy however, it will drag more batter life.
Since this is outside of the scope of unity, you should referer to Xcode Documentation.
Hope this helps. Thanks!
Your answer
![](https://koobas.hobune.stream/wayback/20220612203904im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
GPS power consumption 0 Answers
Trying to Build GPS Tracking Based App, Help 0 Answers
Unity Remote 5 with Unity 5.4.1 no location service on iOS 10.1 0 Answers
LocationServices on iOS provides much higher measurements than on Android 0 Answers
How to get device location in double insead of float 0 Answers