March 2018
Intermediate to advanced
192 pages
4h 4m
English
Now that we have created an interface for our location service and updated the ViewModel, we will need to create the concrete platform-specific implementations. Create the location service implementations as follows:
public class LocationService : ILocationService { CLLocationManager _manager; TaskCompletionSource<CLLocation> _tcs; public async Task<GeoCoords> GetGeoCoordinatesAsync() { _manager = new CLLocationManager(); _tcs = new TaskCompletionSource<CLLocation>(); if ...