c# - Geolocation doesn't work iOS PCL Xamarin forms -
I'm trying to get the device location with the help of this example. It works on simulators, but the iPad does not work on Air. My information containing all the necessary keys for the location. The filist file., NSLocationUsageDescription and NSLocationWhenInUseUsageDescription
In the code
if (this. Manager .RespondsToSelector (new selector ("requestWhenInUseAuthorization")) {this.manager.RequestWhenInUseAuthorization (); }
The piece of code where geolocator is using the object.
IGeolocator geolocator = null; Geolocator = dependency service Go & lt; IGeolocator & gt; (); If (geolocator! = Null) {if (geographical. Isoolocation enhanced) {try (if !! Geolocator.IsListening) geolocator.StartListening (1000, 1000); Var function = Dependable geolocator gatepsia sink (10000, cancellation token one); If (work! = Null) {this.Position = task; }
But the location does not fire the event ever ...
The location is on the device.
If anyone has a similar problem .. please help ..... Once, work on simulators.
I use iOS 8.1 on VS 2013, XMarin 3.7, XMarin.IOS 8.4, iPad Air.
Does this work properly in the iPad Air Simulator? It seems like a specific problem for the device you are using Maybe someone hit "cancel" on location popup permission?
Settings-> General-> Restriction-> Location Services
. Ensure that everything for your app is on and is acceptable, I will also try another app, and make sure the location is working in that app.
Comments
Post a Comment