
// Info.plist 설정
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
<string>location</string>
<string>fetch</string>
<string>remote-notification</string>
</array>
카메라 접근
위치 추적
오디오/비디오
class BackgroundTaskManager {
func beginBackgroundTask() {
var backgroundTask: UIBackgroundTaskIdentifier = .invalid
backgroundTask = UIApplication.shared.beginBackgroundTask {
UIApplication.shared.endBackgroundTask(backgroundTask)
backgroundTask = .invalid
}
}
}