In this tutorial I will show you how to get user current location using apple native api (Core Location Class ) to get locations and in next tutorial I will use google maps SDK to get the user location. iOS has very powerful APIs for tracking user locations and working with maps
Step 1:
import CoreLocation
Step 2:
enable requestAlwaysAuthorization() and requestWhenInUseAuthorization()
Step 3:
locationManager.startUpdatingLocation()
Step 4:
use CLLocationManagerDelegate Method
Step 5:
method name didUpdateLocations inside CLLocationManager
Github code link :
https://github.com/umarfarooq21/CurrentLocationDemo
#CLLocationManager #CoreLocation #Swift5
Download
0 formats
No download links available.
How to get current location in iOS programmatically | Swift 5 - Xcode11 | NatokHD