When using Mapkit in Xcode, all we need is to do configurations in the following steps:
Setting the default location:
product > scheme > edit scheme
1. Enable Maps capability
project > capabilities > Maps > on2. Adding import libraries
Add these two lines inViewController.swift
import CoreLocation
import MapKit
3. Adding keys in info.plist
NSLocationWhenInUseUsageDescription : 需要時取得使⽤用者位置
NSLocationAlwaysUsageDescription : 不斷的取得位置
4. Create a Location.gpx if using simulator and customizing default location
Setting the default location:
product > scheme > edit scheme