Ch 04. 물마시기 알람 앱 만들기
기능 상세:
- 물을 마시는 시간 설정
- 해당 시간에 알림 설정
- 알림 ON/OFF
- 정해진 시간에 알림센터 표시, 아이콘 배지 표시
활용 기술:
- Local Notification 구성
- Notification Request
(UNNotificationRequest)
알림 요청- identifier
각각의 요청을 구분(ID) - content
(UNMutableNotificationContent)
알림에 나타날 내용 정의(title, body, sound, badge) - trigger
(UNCalendarNotificationTrigger - 날짜,
UNTimeIntervalNotificationTrigger - 시간간격,
UNLocationNotificationTrigger - 위치)
어떤 기준에서 발송될 것인지 선언
- identifier
- Notification Center
(UNNotificationCenter)
Request를 보관 후 Trigger 발생시 알림 전송
- Notification Request