Advances in App Background Execution - WWDC19 - Videos - Apple Developer

백그라운드 실행

1.app request 앱내에서 사용자의 리퀘스트

  1. trigger 촉발

고려할점

  1. 전력.
  2. 성능
  3. 프라이버시

4가지 예제

앱을 떠나도 완료 보장 - 메세징 앱

외부에서 오는 알림에 반응 - Phonecall 앱 VoIP push Notification

최적의 시간에 할 수 있도록 - Muted Thread 주의점 apns-priority = 5

새 컨텐츠의 변화 수용할 수 있도록 - Background URL Session

사용법

import BGTask

info.plist에서 백그라운드 모드 설정하고

identifier 생성

expiration, completed 핸들러 구현한 뒤

appDelegate에서 didEnterbackground 에서 사용!