CoreMotion 사용설정
Info.plist
NSMotionUsageDescription
UIRequiredDeviceCapabilities 에 accelerometer, gyroscope 등
import CoreMotion
let cmManager = CMMotionManager()
CoreLocation
Info.plist Always When use…
import CoreLocation
var locationManager = CLLocationManager()
delegate 잡아주고.
locationManager.requestAlwaysAuthorization()
locationManager.startUpdatingLocation()
백그라운드에서도 업데이트 받으려면…
Application target → Sign in & Capabilities → Capabilities button on the left → Choose Background Modes. Then, enable location updates.
locationManager?.allowsBackgroundLocationUpdates = true