{"id":503970,"date":"2026-11-19T16:16:15","date_gmt":"2026-11-19T13:16:15","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=503970"},"modified":"2026-11-19T16:16:15","modified_gmt":"2026-11-19T13:16:15","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=503970","title":{"rendered":"\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0443\u0448\u0438: \u043a\u0430\u043a \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c, \u0435\u0441\u043b\u0438 APNs \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/43\/1a\/4c\/431a4c7a3dcea542faaa4cc3d920e816.jpg\" width=\"780\" height=\"440\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/43\/1a\/4c\/431a4c7a3dcea542faaa4cc3d920e816.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/43\/1a\/4c\/431a4c7a3dcea542faaa4cc3d920e816.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u042f \u042e\u0440\u0430 \u0411\u0443\u0447\u0438\u043d, iOS Developer \u043a\u043e\u043c\u0430\u043d\u0434\u044b Anticrisis Core \u0432 \u0422-\u0411\u0430\u043d\u043a\u0435. \u0420\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u043c\u044b \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043a\u0430\u043d\u0430\u043b \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u0438 \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c Apple Push Notification service (APNs).<\/p>\n<p>APNs \u2014 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u0430\u043d\u0430\u043b \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u0438 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u043e. \u0412 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u043a\u0430\u043d\u0430\u043b \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c \u0438\u0437-\u0437\u0430 \u0441\u0430\u043d\u043a\u0446\u0438\u0439, \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u043d\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 push-\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p>\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0443\u0448\u0438 \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u043e\u0442 APNs \u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043f\u0440\u044f\u043c\u043e \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0443\u0448\u0438, \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0430\u043d\u0430\u043b\u043e\u0433 APNs \u2014 \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u0437\u0430 \u043f\u0443\u0448\u0430\u043c\u0438 \u0438\u0437 \u0444\u043e\u043d\u0430 \u043a \u0441\u0432\u043e\u0435\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0438 \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435. \u0423 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0443\u0448\u0435\u0439 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u043d\u043e \u0432 \u0440\u044f\u0434\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u044d\u0442\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0434\u043e\u0441\u0442\u0443\u0447\u0430\u0442\u044c\u0441\u044f \u0434\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0444\u043e\u043d\u0435.<\/p>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c:<\/p>\n<ul>\n<li>\n<p>\u0447\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0443\u0448\u0438 \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043e\u0442 remote \u0438 \u043a\u043e\u0433\u0434\u0430 \u0438\u0445 \u0441\u0442\u043e\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c;<\/p>\n<\/li>\n<li>\n<p>\u043a\u0430\u043a \u0438\u0445 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c;<\/p>\n<\/li>\n<li>\n<p>\u043a\u0430\u043a \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0442\u0435\u0440\u044f\u0442\u044c \u043f\u0443\u0448\u0438;<\/p>\n<\/li>\n<li>\n<p>\u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Background Tasks \u0434\u043b\u044f \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0444\u043e\u043d\u0435;<\/p>\n<\/li>\n<li>\n<p>\u0433\u0440\u0430\u0431\u043b\u0438, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043d\u0430\u0441\u0442\u0443\u043f\u0438\u043b\u0438.<\/p>\n<\/li>\n<\/ul>\n<h2>\u041c\u043e\u0442\u0438\u0432\u0430\u0446\u0438\u044f<\/h2>\n<blockquote>\n<p>A penny saved is a penny got.\u00a0(\u0411\u0435\u043d\u0434\u0436\u0430\u043c\u0438\u043d \u0424\u0440\u0430\u043d\u043a\u043b\u0438\u043d)<\/p>\n<p>\u00ab\u0421\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u043b \u2014 \u0441\u0447\u0438\u0442\u0430\u0439, \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u00bb.\u00a0(My perfect simple English)<\/p>\n<\/blockquote>\n<p>Push-\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u2014 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u0438 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u0432\u043d\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0412 \u0448\u0442\u0430\u0442\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f remote-\u043f\u0443\u0448\u0438 \u0447\u0435\u0440\u0435\u0437 APNs. \u041e\u043d\u0438 \u043d\u0430\u0434\u0435\u0436\u043d\u044b, \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e, \u0438 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043d\u0438\u043c\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c.<\/p>\n<p>\u0415\u0441\u043b\u0438 APNs \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b. \u0421\u043e\u0431\u0440\u0430\u043b \u0438\u0445 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"221\" width=\"221\">\n<p align=\"left\">\n<\/td>\n<td>\n<p align=\"left\"><strong>\u0421\u041c\u0421<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>Local Push<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"221\" width=\"221\">\n<p align=\"left\">\u0418\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041d\u0443\u0436\u0435\u043d \u0448\u043b\u044e\u0437, \u0434\u043e\u0433\u043e\u0432\u043e\u0440 \u0441 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041d\u0435 \u043d\u0443\u0436\u043d\u0430 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b Apple, \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0437\u0430\u0434\u0430\u043d\u0438\u0439 \u2014 \u043f\u043e \u0436\u0435\u043b\u0430\u043d\u0438\u044e<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"221\" width=\"221\">\n<p align=\"left\">\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412\u044b\u0441\u043e\u043a\u0430\u044f (\u0437\u0430 \u043a\u0430\u0436\u0434\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435)<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e (\u043a\u0430\u043d\u0430\u043b \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"221\" width=\"221\">\n<p align=\"left\">\u0414\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"221\" width=\"221\">\n<p align=\"left\">Real-time<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0414\u0430 (\u0441 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430\u043c\u0438)<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041d\u0435\u0442 (\u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0437\u0430\u0440\u0430\u043d\u0435\u0435)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"221\" width=\"221\">\n<p align=\"left\">\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0442 \u041e\u0421<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041d\u0435\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0414\u0430 (\u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f iOS)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"221\" width=\"221\">\n<p align=\"left\">\u041e\u0445\u0432\u0430\u0442<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041b\u044e\u0431\u043e\u0439 \u0442\u0435\u043b\u0435\u0444\u043e\u043d<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0422\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0421\u041c\u0421 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0439 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043e\u0439 \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u043e. \u042d\u0442\u043e \u0434\u043e\u0440\u043e\u0433\u043e, \u043d\u0435 \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e, \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0421\u041c\u0421 \u043a\u0430\u043a \u0441\u043f\u0430\u043c. \u041d\u043e \u0442\u0430\u043a\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435.<\/p>\n<p>Local Push \u2014 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u043a\u0430\u043d\u0430\u043b \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 \u0432 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e\u043c \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432\u0438\u0434\u0435. \u041f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043c\u0430\u0440\u043a\u0435\u0442\u0438\u043d\u0433\u043e\u0432\u044b\u0445 \u0438 \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u0439, \u043d\u0435 \u0434\u043b\u044f real-time. \u0418\u0437 \u043c\u0438\u043d\u0443\u0441\u043e\u0432: \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0443 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0443\u0448\u0430 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e.<\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442 \u0441\u0430\u043d\u043a\u0446\u0438\u0438 \u0438 \u043e\u043d\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043d\u043e\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 APNs, \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0443\u0448\u0438 \u2014 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0447\u043d\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u044e \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c \u0438\u0437 \u0444\u043e\u043d\u0430. \u041c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0433\u0434\u0430 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430 \u043d\u0443\u0436\u043d\u0430, \u043d\u0430\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0432\u043d\u0435\u0437\u0430\u043f\u043d\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0443 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0443\u0448\u0430\u043c\u0438 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<h2>\u041f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0443\u0448\u0430<\/h2>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0443\u0448\u0438, \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0442\u043e\u0442 \u0436\u0435, \u0447\u0442\u043e \u0438 \u0434\u043b\u044f remote:<\/p>\n<pre><code class=\"swift\">UNUserNotificationCenter.current().requestAuthorization(options: [                                            .alert, .sound, .badge]) { granted, error in\u00a0\u00a0\u00a0\u00a0if let error = error {\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return    }\u00a0\u00a0\u00a0\u00a0if granted {\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ \u041c\u043e\u0436\u043d\u043e \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0443\u0448\u0438\u00a0\u00a0\u00a0\u00a0}}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper\"><\/span><\/a><\/div><\/pre>\n<p>\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u0438\u043d \u0440\u0430\u0437. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u043f\u043e\u0437\u0436\u0435 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043c\u0435\u0442\u043e\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 <a href=\"https:\/\/developer.apple.com\/documentation\/usernotifications\/unusernotificationcenter\/requestauthorization(options:completionhandler:)\">Apple Developer Documentation: requestAuthorization.<\/a><\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/91\/03\/8e\/91038ec1aad2f7d4edc86e9198dea43b.png\" alt=\"\u0417\u0430\u043f\u0440\u043e\u0441 \u043e\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u043d\u043e\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c.\" title=\"\u0417\u0430\u043f\u0440\u043e\u0441 \u043e\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u043d\u043e\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c.\" width=\"1560\" height=\"804\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/91\/03\/8e\/91038ec1aad2f7d4edc86e9198dea43b.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/91\/03\/8e\/91038ec1aad2f7d4edc86e9198dea43b.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0417\u0430\u043f\u0440\u043e\u0441 \u043e\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u043d\u043e\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c.<\/figcaption><\/div>\n<\/figure>\n<p>\u0427\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0443\u0448, \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c <code>UNNotificationRequest<\/code> \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0432 <code>UNUserNotificationCenter.<\/code> \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043e \u043c\u0435\u0442\u043e\u0434\u0430\u0445 \u043c\u043e\u0436\u043d\u043e \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 Apple <a href=\"https:\/\/developer.apple.com\/documentation\/usernotifications\/unnotificationrequest\">UNNotificationRequest<\/a>,<a href=\"https:\/\/developer.apple.com\/documentation\/usernotifications\/unusernotificationcenter\/add(_:withcompletionhandler:)\"> add(_:).<\/a><\/p>\n<pre><code class=\"swift\">import UserNotifications \/\/ 1. \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u043d\u0442let content = UNMutableNotificationContent()content.title = \"Hello Everyone\"content.body = \"\u0421\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u043e Local Push\"content.sound = .default \/\/ 2. \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0442\u0440\u0438\u0433\u0433\u0435\u0440 (\u0432\u0440\u0435\u043c\u044f, \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c \u0438\u043b\u0438 \u0433\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u044e)let trigger = UNTimeIntervalNotificationTrigger(    timeInterval: 10,   \/\/ \u0447\u0435\u0440\u0435\u0437 10 \u0441\u0435\u043a\u0443\u043d\u0434    repeats: false  \/\/ \u0431\u0435\u0437 \u043f\u043e\u0432\u0442\u043e\u0440\u0430) \/\/ 3. \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441let identifier = UUID().uuidStringlet request = UNNotificationRequest(    identifier: identifier,    content: content,    trigger: trigger) \/\/ 4. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0446\u0435\u043d\u0442\u0440 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439UNUserNotificationCenter.current().add(request) { error in    if let error = error {        \/\/ \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443    }}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>API iOS \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u0440\u0438 \u0442\u0438\u043f\u0430 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043e\u0432.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"357\" width=\"357\">\n<p align=\"left\"><strong>\u0422\u0440\u0438\u0433\u0433\u0435\u0440<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"357\" width=\"357\">\n<p align=\"left\"><a href=\"https:\/\/developer.apple.com\/documentation\/usernotifications\/untimeintervalnotificationtrigger\"><code>UNTimeIntervalNotificationTrigger<\/code><\/a><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0427\u0435\u0440\u0435\u0437 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041d\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u0447\u0430\u0441<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"357\" width=\"357\">\n<p align=\"left\"><a href=\"https:\/\/developer.apple.com\/documentation\/usernotifications\/uncalendarnotificationtrigger\"><code>UNCalendarNotificationTrigger<\/code><\/a><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u0442\u0443 \u0438 \u0432\u0440\u0435\u043c\u044f<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0415\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u044b\u0439 \u043e\u0442\u0447\u0435\u0442 \u0432 09:00<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"357\" width=\"357\">\n<p align=\"left\"><a href=\"https:\/\/developer.apple.com\/documentation\/usernotifications\/unlocationnotificationtrigger\"><code>UNLocationNotificationTrigger<\/code><\/a><\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u0440\u0438 \u0432\u0445\u043e\u0434\u0435\/\u0432\u044b\u0445\u043e\u0434\u0435 \u0438\u0437 \u0433\u0435\u043e\u0437\u043e\u043d\u044b<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041d\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u043e \u043f\u043e\u043a\u0443\u043f\u043a\u0435 \u043f\u0440\u0438 \u0432\u0445\u043e\u0434\u0435 \u0432 \u043c\u0430\u0433\u0430\u0437\u0438\u043d<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041d\u0430 \u043a\u0430\u0436\u0434\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f:<\/p>\n<ul>\n<li>\n<p>64 \u2014 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0443\u0448\u0435\u0439 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0430\u043c\u0438;<\/p>\n<\/li>\n<li>\n<p>20 \u2014 \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u043f\u0443\u0448\u0435\u0439 \u0441 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043e\u043c UNLocationNotificationTrigger.<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0435\u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0438 \u043f\u0440\u0435\u0432\u044b\u0448\u0435\u043d\u0438\u0438 \u043b\u0438\u043c\u0438\u0442\u043e\u0432: \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 64 \u043f\u0443\u0448\u0430 \u0441 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u043c\u0438 \u0434\u0430\u0442\u0430\u043c\u0438 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f, \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u043e\u043b\u0447\u0430 \u043e\u0442\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f. \u041d\u043e, \u0435\u0441\u043b\u0438 \u0443\u043f\u0435\u0440\u0435\u0442\u044c\u0441\u044f \u0432 \u043b\u0438\u043c\u0438\u0442 \u0434\u043b\u044f \u043f\u0443\u0448\u0435\u0439 \u0441 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043e\u043c UNLocationNotificationTrigger, 21 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0439 \u043f\u0443\u0448 \u0441 \u044d\u0442\u0438\u043c \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u043f\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0438 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0441\u0442\u0430\u043d\u0443\u0442\u0441\u044f 20 \u0440\u0430\u043d\u0435\u0435 \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0443\u0448\u0435\u0439. \u041d\u0438 \u0432 \u0442\u043e\u043c \u043d\u0438 \u0434\u0440\u0443\u0433\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 add callback, \u0442\u0430\u043a \u0447\u0442\u043e \u0441\u0442\u043e\u0438\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0443\u0448\u0435\u0439 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<h2>\u041a\u0430\u043a \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u043f\u0443\u0448 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f<\/h2>\n<p>\u0421 remote-\u043f\u0443\u0448\u0430\u043c\u0438 \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e: Notification Service Extension (NSE) \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0434 \u043f\u043e\u043a\u0430\u0437\u043e\u043c. \u0421 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0443\u0448\u0430\u043c\u0438 NSE \u043d\u0435 \u043e\u0442\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442. \u041e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0447\u0435\u0440\u0435\u0437 UNUserNotificationCenter. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0432\u0432\u0435\u0441\u0442\u0438 \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u043b\u043e\u0433\u0438\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u0435\u0439 \u043f\u0443\u0448\u0435\u0439 (\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0438 \u0440\u0435\u043c\u043e\u0443\u0442) \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/p>\n<p><strong>\u041e\u0447\u0435\u0440\u0435\u0434\u044c \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0443\u0448\u0435\u0439.<\/strong> \u0422\u0430\u043c \u043f\u0443\u0448\u0438 \u043e\u0436\u0438\u0434\u0430\u044e\u0442, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0441\u0442\u0443\u043f\u0438\u0442 \u043c\u043e\u043c\u0435\u043d\u0442, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043e\u043d\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f. \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a \u043d\u0438\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043c\u043e\u0436\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430<a href=\"https:\/\/developer.apple.com\/documentation\/usernotifications\/unusernotificationcenter\/getpendingnotificationrequests(completionhandler:)\"> <code>getPendingNotificationRequests<\/code>:<\/a><\/p>\n<pre><code class=\"swift\">let notificationCenter = UNUserNotificationCenter.current() \/\/ \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435, \u043d\u043e \u0435\u0449\u0435 \u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0443\u0448\u0438notificationCenter.getPendingNotificationRequests { requests in    for request in requests {        print(\"\u041e\u0436\u0438\u0434\u0430\u0435\u0442: \\(request.identifier), \u0442\u0440\u0438\u0433\u0433\u0435\u0440: \\(request.trigger.debugDescription)\")    }}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p><strong>\u041e\u0447\u0435\u0440\u0435\u0434\u044c \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u0443\u0448\u0435\u0439.<\/strong> \u042d\u0442\u043e \u043f\u0443\u0448\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0438 \u0436\u0434\u0443\u0442, \u043f\u043e\u043a\u0430 \u043e\u043d \u0441 \u043d\u0438\u043c\u0438 \u043f\u0440\u043e\u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442. \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a \u043d\u0438\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043c\u043e\u0436\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 <a href=\"https:\/\/developer.apple.com\/documentation\/usernotifications\/unusernotificationcenter\/getdeliverednotifications(completionhandler:)\"><code>getDeliveredNotifications:<\/code><\/a><\/p>\n<pre><code class=\"swift\">let notificationCenter = UNUserNotificationCenter.current()\/\/ \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0443\u0448\u0438 (\u0442\u0435, \u0447\u0442\u043e \u0432\u0438\u0441\u044f\u0442 \u0432 \u0426\u0435\u043d\u0442\u0440\u0435 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439)notificationCenter.getDeliveredNotifications { notifications in\u00a0\u00a0\u00a0\u00a0for notification in notifications {\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0print(\"\u0414\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d: \\(notification.request.identifier)\")\u00a0\u00a0\u00a0\u00a0}}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0421\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u044d\u0442\u0438\u0445 \u043e\u0447\u0435\u0440\u0435\u0434\u0435\u0439, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u043f\u0443\u0448\u0438 \u0443\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b, \u0430 \u043a\u0430\u043a\u0438\u0435 \u0435\u0449\u0435 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u0438.<\/p>\n<p>\u0414\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0433\u0435\u043e\u043f\u0443\u0448\u0435\u0439 \u043d\u0443\u0436\u0435\u043d \u0435\u0449\u0435 \u0437\u0430\u043f\u0440\u043e\u0441 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u0433\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u0438 \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 While Using, \u0438\u043d\u0430\u0447\u0435 \u0442\u0430\u043a\u0438\u0435 \u043f\u0443\u0448\u0438 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u0441\u043e\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0430 <a href=\"https:\/\/developer.apple.com\/documentation\/usernotifications\/unlocationnotificationtrigger\">UNLocationNotificationTrigger.<\/a><\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/d5\/fd\/00\/d5fd005995d0d9f1621c23ba4ce1496f.png\" alt=\"\u0417\u0430\u043f\u0440\u043e\u0441 \u043e\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u0433\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c.\" title=\"\u0417\u0430\u043f\u0440\u043e\u0441 \u043e\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u0433\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c.\" width=\"232\" height=\"212\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/d5\/fd\/00\/d5fd005995d0d9f1621c23ba4ce1496f.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/d5\/fd\/00\/d5fd005995d0d9f1621c23ba4ce1496f.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0417\u0430\u043f\u0440\u043e\u0441 \u043e\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u0433\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c.<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u0443\u0448\u0438 \u0441 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043e\u043c <code>UNLocationNotificationTrigger <\/code>\u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0432 <code>getDeliveredNotifications.<\/code> \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0445, \u043d\u043e \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043e\u043d\u0438 \u043d\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f.<\/p>\n<p>\u041a\u0430\u043a \u043e\u0442\u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0443 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u0443\u0448\u0430:<\/p>\n<ol>\n<li>\n<p>\u041f\u043e \u043f\u0440\u043e\u043f\u0430\u0436\u0435 \u0438\u0437 pending. \u0415\u0441\u043b\u0438 \u043f\u0443\u0448 \u0441 \u0433\u0435\u043e\u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043e\u043c \u0431\u044b\u043b \u0432 \u0441\u0442\u0430\u0442\u0443\u0441\u0435 planned \u0438 \u043f\u0440\u043e\u043f\u0430\u043b \u0438\u0437 <code>getPendingNotificationRequests<\/code>, \u0437\u043d\u0430\u0447\u0438\u0442, \u043e\u043d \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d. \u041f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u043c \u0432 delivered. \u042d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u043c\u044b \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0443\u0448\u0435\u0439 \u0438\u0437 \u043e\u0447\u0435\u0440\u0435\u0434\u0438.<\/p>\n<\/li>\n<li>\n<p>Core Location. \u041c\u043e\u0436\u043d\u043e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0432\u0445\u043e\u0434 \u0438 \u0432\u044b\u0445\u043e\u0434 \u0438\u0437 \u0433\u0435\u043e\u0437\u043e\u043d\u044b \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0438 \u0441\u0432\u0435\u0440\u044f\u0442\u044c \u0441 \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u0443\u0448\u0430\u043c\u0438. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u044d\u0442\u043e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c.<\/p>\n<\/li>\n<\/ol>\n<p>\u041c\u043e\u0436\u043d\u043e \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0438\u0442\u044c \u0433\u0435\u043e\u043f\u0443\u0448 \u043d\u0430 \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0435\u0433\u043e \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0443 \u0447\u0435\u0440\u0435\u0437 \u043c\u0435\u043d\u044e Features \u2192 Location \u2192 Custom Location.<\/p>\n<details class=\"spoiler\">\n<summary>\u0412\u0432\u043e\u0434 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0432 Simulator<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/60\/70\/e4\/6070e48fa69734b17fad3858317fba73.png\" alt=\"\u0412\u044b\u0431\u043e\u0440 \u043c\u0435\u043d\u044e Features\u00a0\u2192 Location \u0432 \u0442\u0443\u043b\u0431\u0430\u0440\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Simulator.\" title=\"\u0412\u044b\u0431\u043e\u0440 \u043c\u0435\u043d\u044e Features\u00a0\u2192 Location \u0432 \u0442\u0443\u043b\u0431\u0430\u0440\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Simulator.\" width=\"522\" height=\"652\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/60\/70\/e4\/6070e48fa69734b17fad3858317fba73.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/60\/70\/e4\/6070e48fa69734b17fad3858317fba73.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0412\u044b\u0431\u043e\u0440 \u043c\u0435\u043d\u044e Features\u00a0\u2192 Location \u0432 \u0442\u0443\u043b\u0431\u0430\u0440\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Simulator.<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/eb\/9c\/a3\/eb9ca3062d8f591b15761104cf75abea.png\" alt=\"\u0412\u044b\u0431\u043e\u0440 \u043c\u0435\u043d\u044e\u00a0Custom Location.\" title=\"\u0412\u044b\u0431\u043e\u0440 \u043c\u0435\u043d\u044e\u00a0Custom Location.\" width=\"924\" height=\"920\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/eb\/9c\/a3\/eb9ca3062d8f591b15761104cf75abea.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/eb\/9c\/a3\/eb9ca3062d8f591b15761104cf75abea.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0412\u044b\u0431\u043e\u0440 \u043c\u0435\u043d\u044e\u00a0Custom Location.<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/7b\/36\/ba\/7b36baede796a698fea2cbd575f6fc04.png\" alt=\"\u0412\u0432\u043e\u0434 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u0432\u00a0Custom Location.\" title=\"\u0412\u0432\u043e\u0434 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u0432\u00a0Custom Location.\" width=\"1004\" height=\"664\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/7b\/36\/ba\/7b36baede796a698fea2cbd575f6fc04.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/7b\/36\/ba\/7b36baede796a698fea2cbd575f6fc04.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0412\u0432\u043e\u0434 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u0432\u00a0Custom Location.<\/figcaption><\/div>\n<\/figure>\n<\/div>\n<\/details>\n<p>\u0416\u043e\u043d\u0433\u043b\u0438\u0440\u0443\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438, \u043c\u043e\u0436\u043d\u043e \u044d\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0432\u0445\u043e\u0434\u0430 \u0438 \u0432\u044b\u0445\u043e\u0434\u0430 \u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u043b\u043e\u043a\u0430\u0446\u0438\u044e \u0438 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0438\u0442\u044c \u0433\u0435\u043e\u043f\u0443\u0448\u0438.<\/p>\n<h2>\u041a\u0430\u043a \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u0441 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u043f\u0443\u0448\u0435\u043c<\/h2>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u043c\u0430\u0445\u043d\u0443\u043b \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u0443\u0448 \u0438\u0437 \u0426\u0435\u043d\u0442\u0440\u0430 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439, \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u0442 \u043e\u0431 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u041f\u0443\u0448 \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u0447\u0435\u0437\u0430\u0435\u0442 \u0438\u0437 <code>getDeliveredNotifications<\/code>.<\/p>\n<p>\u041f\u0440\u0438 \u0442\u0430\u043f\u0435 \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0443\u0448 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 \u0442\u0435 \u0436\u0435 \u043c\u0435\u0442\u043e\u0434\u044b<a href=\"https:\/\/developer.apple.com\/documentation\/usernotifications\/unusernotificationcenterdelegate\"> <code>UNUserNotificationCenterDelegate<\/code><\/a><code>,<\/code> \u0447\u0442\u043e \u0438 remote-\u043f\u0443\u0448\u0438:<\/p>\n<pre><code class=\"swift\">func userNotificationCenter(\u00a0\u00a0\u00a0\u00a0_ center: UNUserNotificationCenter,\u00a0\u00a0\u00a0\u00a0didReceive response: UNNotificationResponse,\u00a0\u00a0\u00a0\u00a0withCompletionHandler completionHandler: @escaping () -&gt; Void) {\u00a0\u00a0\u00a0\u00a0let isLocalPush = response.notification.request.content.userInfo[\"isLocalPush\"] as? Bool ?? false\u00a0\u00a0\u00a0\u00a0\/\/ ...\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430\u00a0\u00a0\u00a0\u00a0completionHandler()}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0438 remote-\u043f\u0443\u0448\u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u0432 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u0434\u0435\u043b\u0435\u0433\u0430\u0442, \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u043f\u043e\u0441\u043e\u0431 \u0438\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0442\u044c. \u041f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u043b\u0430\u0433 \u0432 <code>userInfo<\/code>:<\/p>\n<pre><code class=\"swift\">content.userInfo = [\"isLocalPush\": true]<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0422\u043e\u0433\u0434\u0430 \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u043e\u0442\u043a\u0443\u0434\u0430 \u043f\u0440\u0438\u0448\u0435\u043b \u043f\u0443\u0448.<\/p>\n<h2>\u041a\u0430\u043a \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0443\u0448\u0438<\/h2>\n<p>\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0443\u0448\u0438 \u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0438\u0437 \u043e\u0431\u0435\u0438\u0445 \u043e\u0447\u0435\u0440\u0435\u0434\u0435\u0439. \u0418\u0437\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u043e \u043c\u0435\u0442\u043e\u0434\u0430\u0445 \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0443\u0448\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 Apple:<\/p>\n<ul>\n<li>\n<p>\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0438\u0437 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0443\u0448\u0435\u0439 \u2014 <a href=\"https:\/\/developer.apple.com\/documentation\/usernotifications\/unusernotificationcenter\/removependingnotificationrequests(withidentifiers:)\"><code>removePendingNotificationRequests(withIdentifiers:)<\/code><\/a><code>;<\/code><\/p>\n<\/li>\n<li>\n<p>\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0438\u0437 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u0443\u0448\u0435\u0439 \u2014<a href=\"https:\/\/developer.apple.com\/documentation\/usernotifications\/unusernotificationcenter\/removedeliverednotifications(withidentifiers:)\"> <code>removeDeliveredNotifications(withIdentifiers:).<\/code><\/a><\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"swift\">let center = UNUserNotificationCenter.current()\/\/ \u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u0437 \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445center.removePendingNotificationRequests(withIdentifiers: [\"id1\", \"id2\"])\/\/ \u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u0437 \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445center.removeDeliveredNotifications(withIdentifiers: [\"id1\", \"id2\"])<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0415\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u043f\u0443\u0448\u0435\u0439 \u0441\u0440\u0430\u0437\u0443 (<a href=\"https:\/\/developer.apple.com\/documentation\/usernotifications\/unusernotificationcenter\/removeallpendingnotificationrequests()\"><code>removeAllPendingNotificationRequests<\/code><\/a><code>,<\/code><a href=\"https:\/\/developer.apple.com\/documentation\/usernotifications\/unusernotificationcenter\/removealldeliverednotifications()\"><code> removeAllDeliveredNotifications<\/code><\/a>), \u043d\u043e \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0443\u0448\u0435\u0439 \u043e\u043d\u0438 \u043e\u043f\u0430\u0441\u043d\u044b: \u043c\u043e\u0433\u0443\u0442 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438 remote-\u043f\u0443\u0448\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0442\u043e\u0436\u0435 \u0445\u0440\u0430\u043d\u0438\u0442 \u0432 \u044d\u0442\u0438\u0445 \u043e\u0447\u0435\u0440\u0435\u0434\u044f\u0445.<\/p>\n<p>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435: \u043f\u0443\u0448\u0438 \u0441 <code>UNLocationNotificationTrigger<\/code> \u043d\u0435\u043b\u044c\u0437\u044f \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u0437 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u2014 \u043c\u0435\u0442\u043e\u0434 removeDeliveredNotifications \u043d\u0430 \u043d\u0438\u0445 \u043d\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442.<\/p>\n<h2>\u0421\u0442\u0430\u0442\u0443\u0441\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c<\/h2>\n<p>\u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0435 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445:<\/p>\n<ul>\n<li>\n<p>\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u043c\u0430\u0445\u043d\u0443\u043b \u043f\u0443\u0448 \u2014 \u043d\u0435\u0442 \u043a\u043e\u043b\u0431\u044d\u043a\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0433\u0435\u043e\u043f\u0443\u0448 \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u2014 \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 <code>getDeliveredNotifications<\/code>;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0443\u0448 \u0437\u0430\u043c\u0435\u043d\u0435\u043d \u0434\u0440\u0443\u0433\u0438\u043c \u2014 \u0441\u0442\u0430\u0440\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u0447\u0435\u0437\u0430\u0435\u0442.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u044d\u0442\u0438\u043c \u0441\u0442\u043e\u0438\u0442 \u0432\u0432\u0435\u0441\u0442\u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0443\u0448\u0435\u0439 \u0438 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u044b \u0441\u0442\u0430\u0442\u0443\u0441\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043c\u0435\u0445\u0430\u043d\u0438\u043a\u0438.<\/p>\n<p>\u0414\u043b\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u043f\u0443\u0448\u0435\u0439 (TimeInterval, Calendar):<\/p>\n<pre><code class=\"swift\">failureplanned \u2500\u2500\u25ba delivered \u2500\u2500\u25ba read  \u2502              \u2502  \u251c\u2500\u2500\u25ba skipped   \u2514\u2500\u2500\u25ba deleted  \u251c\u2500\u2500\u25ba displaced  \u2514\u2500\u2500\u25ba deleted<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0414\u043b\u044f \u0433\u0435\u043e\u043f\u0443\u0448\u0435\u0439 (Location):<\/p>\n<pre><code class=\"swift\">failureplanned \u2500\u2500\u25ba delivered \u2500\u2500\u25ba read  \u2502  \u2514\u2500\u2500\u25ba displaced  \u2514\u2500\u2500\u25ba deleted<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0421\u0442\u0430\u0442\u0443\u0441\u044b skipped \u0438 delivered \u2192 deleted \u0434\u043b\u044f \u0433\u0435\u043e\u043f\u0443\u0448\u0435\u0439 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f: skipped \u2014 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043e\u0442\u043b\u0438\u0447\u0438\u0442\u044c \u00ab\u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u00bb \u043e\u0442 \u00ab\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d, \u043d\u043e \u043d\u0435 \u0432\u0438\u0434\u0435\u043d \u0432 delivered\u00bb, delivered \u2192 deleted \u2014 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0433\u0435\u043e\u043f\u0443\u0448\u0438 \u043d\u0435\u043b\u044c\u0437\u044f \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u0437 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445.<\/p>\n<p>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>planned \u2014 \u043f\u0443\u0448 \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d, \u0436\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438. \u041c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u0443\u0448\u0435 \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 getPendingNotificationRequests.<\/p>\n<\/li>\n<li>\n<p>delivered \u2014 \u043f\u0443\u0448 \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d. \u041f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0432 \u0426\u0435\u043d\u0442\u0440\u0435 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 \u0438\u043b\u0438 \u043f\u0440\u043e\u043f\u0430\u043b \u0438\u0437 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u0433\u0435\u043e.<\/p>\n<\/li>\n<li>\n<p>read \u2014 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0442\u0430\u043f\u043d\u0443\u043b \u043f\u043e \u043f\u0443\u0448\u0443.<\/p>\n<\/li>\n<li>\n<p>failure \u2014 \u043e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 add(_:), \u043f\u0443\u0448 \u043d\u0435 \u0431\u044b\u043b \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d.<\/p>\n<\/li>\n<li>\n<p>skipped \u2014 \u043f\u0443\u0448 \u043d\u0435 \u0432\u0435\u0440\u043d\u0443\u043b\u0441\u044f \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 getDeliveredNotifications (\u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u043f\u0443\u0448\u0435\u0439).<\/p>\n<\/li>\n<li>\n<p>displaced \u2014 \u043f\u0443\u0448 \u0431\u044b\u043b \u0432\u044b\u0442\u0435\u0441\u043d\u0435\u043d \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0440\u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0438\u0437-\u0437\u0430 \u043f\u0440\u0435\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u043b\u0438\u043c\u0438\u0442\u043e\u0432 (64 \u2014 \u043e\u0431\u044b\u0447\u043d\u044b\u0435, 20 \u2014 \u0433\u0435\u043e).<\/p>\n<\/li>\n<li>\n<p>deleted \u2014 \u043f\u0443\u0448 \u0431\u044b\u043b \u0443\u0434\u0430\u043b\u0435\u043d \u0447\u0435\u0440\u0435\u0437 API.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438:<\/p>\n<pre><code class=\"swift\">enum LocalPushStatus: String, Codable {\u00a0\u00a0\u00a0\u00a0case planned\u00a0\u00a0\u00a0\u00a0case delivered\u00a0\u00a0\u00a0\u00a0case read\u00a0\u00a0\u00a0\u00a0case skipped\u00a0\u00a0\u00a0\u00a0case displaced\u00a0\u00a0\u00a0\u00a0case deleted\u00a0\u00a0\u00a0\u00a0case failure}struct LocalPushEvent: Codable {\u00a0\u00a0\u00a0\u00a0let identifier: String\u00a0\u00a0\u00a0\u00a0let status: LocalPushStatus}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0414\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0443\u0441\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0435 \u043f\u0435\u0440\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0438 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043d\u0438\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>CoreData, SwiftData, Realm<\/code> \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e <code>UserDefaults<\/code> \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432. \u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u2014 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043a\u0430\u0440\u0442\u0438\u043d\u0443.<\/p>\n<p><strong>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u043e\u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0443\u0448\u0430:\u00a0<\/strong><\/p>\n<ol>\n<li>\n<p>\u041f\u0440\u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u0443\u0448\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u044c \u0441\u043e \u0441\u0442\u0430\u0442\u0443\u0441\u043e\u043c planned. \u0415\u0441\u043b\u0438 \u043f\u0440\u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0443\u043f\u0435\u0440\u043b\u0438\u0441\u044c \u0432 \u043b\u0438\u043c\u0438\u0442\u044b \u0443 \u0432\u044b\u0442\u0435\u0441\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043b\u0438 \u043d\u0435\u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0443\u0448\u0430, \u0441\u0442\u0430\u0432\u0438\u043c \u0441\u0442\u0430\u0442\u0443\u0441 displaced.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u0432 \u0444\u043e\u043d\u0435 \u0438\u043b\u0438 \u043f\u0440\u0438 \u0432\u0445\u043e\u0434\u0435 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c <code>getDeliveredNotifications<\/code> \u0438 <code>getPendingNotificationRequests.<\/code><\/p>\n<\/li>\n<li>\n<p>\u0421\u0432\u0435\u0440\u044f\u0435\u043c \u0441 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u043c\u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u043c\u0438. \u0415\u0441\u043b\u0438 \u043f\u0443\u0448 \u0431\u044b\u043b planned \u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0432 delivered \u2192 delivered (\u0434\u043b\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u0445). \u0415\u0441\u043b\u0438 \u043f\u0443\u0448 \u0431\u044b\u043b planned (\u0433\u0435\u043e) \u0438 \u043f\u0440\u043e\u043f\u0430\u043b \u0438\u0437 pending \u2192 delivered. \u0415\u0441\u043b\u0438 \u043f\u0443\u0448 \u0431\u044b\u043b planned (\u043e\u0431\u044b\u0447\u043d\u044b\u0439) \u0438 \u043d\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0432 delivered \u0432 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0439 \u0441\u0440\u043e\u043a \u2192 skipped. \u0415\u0441\u043b\u0438 \u043f\u0443\u0448 \u0431\u044b\u043b delivered \u0438 \u043f\u0440\u043e\u043f\u0430\u043b \u0438\u0437 delivered \u2192 skipped (\u0441\u043c\u0430\u0445\u043d\u0443\u043b\u0438).<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438 \u0442\u0430\u043f\u0435 \u0447\u0435\u0440\u0435\u0437 \u0434\u0435\u043b\u0435\u0433\u0430\u0442 \u2192 read.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0438 \u2192 deleted.<\/p>\n<\/li>\n<\/ol>\n<h2>Background Tasks<\/h2>\n<p>\u041c\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c, \u043a\u0430\u043a \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0443\u0448, \u043e\u0442\u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0435\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0443 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441\u044b. \u041d\u043e \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0432\u043e\u043f\u0440\u043e\u0441: \u0432 \u043a\u0430\u043a\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0446\u0438\u043a\u043b \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0443\u0448\u0435\u0439?<\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u043e, \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043d\u0435\u0442: \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0441, \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435, \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043f\u0443\u0448\u0438. \u041d\u043e, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u0444\u043e\u043d\u0435, \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 Background Tasks.<\/p>\n<p><code>BackgroundTasks<\/code> \u2014 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0438 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432 \u0444\u043e\u043d\u043e\u0432\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435. \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0441\u0430\u043c\u0430 \u0440\u0435\u0448\u0430\u0435\u0442, \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443, \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044f, \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0431\u0430\u0442\u0430\u0440\u0435\u0438 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u2014 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043f\u043e BackgroundTasks: <a href=\"https:\/\/developer.apple.com\/documentation\/backgroundtasks\">Apple Developer Documentation: Background Tasks.<\/a><\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 BackgroundTasks \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 Info.plist.<\/p>\n<pre><code class=\"swift\">&lt;key&gt;UIBackgroundModes&lt;\/key&gt;&lt;array&gt;    &lt;string&gt;fetch&lt;\/string&gt;    &lt;string&gt;processing&lt;\/string&gt;&lt;\/array&gt;&lt;key&gt;BGTaskSchedulerPermittedIdentifiers&lt;\/key&gt;&lt;array&gt;    &lt;string&gt;LocalPush.refresh&lt;\/string&gt;    &lt;string&gt;LocalPush.processing_power&lt;\/string&gt;    &lt;string&gt;LocalPush.processing_notpower&lt;\/string&gt;&lt;\/array&gt;<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0412 <code>BGTaskSchedulerPermittedIdentifiers<\/code> \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u0434\u043b\u044f \u0444\u043e\u043d\u043e\u0432\u044b\u0445 \u0437\u0430\u0434\u0430\u0447. \u041a\u0430\u0436\u0434\u044b\u0439 \u0442\u0438\u043f \u0437\u0430\u0434\u0430\u0447\u0438 \u2014 \u0441\u0432\u043e\u0439 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440.<\/p>\n<p>\u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u0442\u0440\u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u0434\u043b\u044f \u0442\u0440\u0435\u0445 \u0442\u0438\u043f\u043e\u0432 \u0444\u043e\u043d\u043e\u0432\u044b\u0445 \u0437\u0430\u0434\u0430\u0447, \u0438\u043c\u0435\u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0441\u0430\u043c\u0438\u043c:<\/p>\n<ul>\n<li>\n<p><code>refresh <\/code>\u2014 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0434\u043b\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f refresh-\u0437\u0430\u0434\u0430\u0447\u0438;<\/p>\n<\/li>\n<li>\n<p><code>processing_power<\/code> \u2014 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0434\u043b\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f processing-\u0437\u0430\u0434\u0430\u0447\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u043f\u0438\u0442\u0430\u043d\u0438\u044e;<\/p>\n<\/li>\n<li>\n<p><code>processing_notpower<\/code> \u2014 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0434\u043b\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f processing-\u0437\u0430\u0434\u0430\u0447\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u043f\u0438\u0442\u0430\u043d\u0438\u044e.<\/p>\n<\/li>\n<\/ul>\n<p>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432 <code>AppDelegate.application(_:didFinishLaunchingWithOptions:)<\/code>.<\/p>\n<pre><code class=\"swift\">func registerBGTaskHandlers() {BGTaskScheduler.shared.register(      forTaskWithIdentifier: \"LocalPush.refresh\",       using: nil    ) { task in    self.handleAppRefresh(task: task as! BGAppRefreshTask)}  BGTaskScheduler.shared.register(      forTaskWithIdentifier: \"LocalPush.processing_power\",       using: nil    ) { task in         self.handleProcessingTask(task: task as! BGProcessingTask)    }      BGTaskScheduler.shared.register(      forTaskWithIdentifier: \"LocalPush.processing_notpower\",       using: nil    ) { task in        self.handleProcessingTask(task: task as! BGProcessingTask)    }}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p><strong>\u041d\u0430\u0448\u0438 \u0433\u0440\u0430\u0431\u043b\u0438:<\/strong> \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0430\u0434\u0430\u043b\u043e \u043f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0437\u0430\u0434\u0430\u0447 \u0441 \u043e\u0434\u043d\u0438\u043c \u0438 \u0442\u0435\u043c \u0436\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u043f\u043e\u0434\u0440\u044f\u0434. \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e<a href=\"https:\/\/developer.apple.com\/documentation\/backgroundtasks\/bgtaskscheduler\/register(fortaskwithidentifier:using:launchhandler:)\"> <code>register(forTaskWithIdentifier:using:handler:)<\/code><\/a> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0440\u043e\u0432\u043d\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u0437\u0430 \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<pre><code class=\"swift\">func scheduleAllTasks() {    \/\/ BGAppRefreshTask \u2014 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b 15 \u043c\u0438\u043d\u0443\u0442    let refreshRequest = BGAppRefreshTaskRequest(identifier: \"LocalPush.refresh\")    refreshRequest.earliestBeginDate = Date(timeIntervalSinceNow: 15 * 60)         \/\/ BGProcessingTask \u2014 \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0442\u044f\u0436\u0435\u043b\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439    let powerRequest = BGProcessingTaskRequest(identifier: \"LocalPush.processing_power\")    \/\/ \u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0442\u0430\u0441\u043a\u0438 \u043d\u0443\u0436\u0435\u043d \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442    powerRequest.requiresNetworkConnectivity = true    \/\/ \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u043a \u0437\u0430\u0440\u044f\u0434\u043a\u0435    powerRequest.requiresExternalPower = true         let noPowerRequest = BGProcessingTaskRequest(identifier: \"LocalPush.processing_notpower\")    \/\/ \u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0442\u0430\u0441\u043a\u0438 \u043d\u0443\u0436\u0435\u043d \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442    noPowerRequest.requiresNetworkConnectivity = true    \/\/ \u041d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u043a \u0437\u0430\u0440\u044f\u0434\u043a\u0435    noPowerRequest.requiresExternalPower = false    do {        try BGTaskScheduler.shared.submit(refreshRequest)        try BGTaskScheduler.shared.submit(powerRequest)        try BGTaskScheduler.shared.submit(noPowerRequest)    } catch {        print(\"\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c BGTask: \\(error)\")    }}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0412\u0430\u0436\u043d\u043e: \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435. \u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432\u0441\u0435 \u0442\u0440\u0438 \u0442\u0438\u043f\u0430 \u0442\u0430\u0441\u043e\u043a \u0434\u043b\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0443\u0448\u0435\u0439 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0432 \u0440\u0430\u0437\u0440\u0435\u0437\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u0432, \u0442\u0443\u0442 \u0444\u0430\u0432\u043e\u0440\u0438\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 <code>BGAppRefreshTaskRequest.<\/code><\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/extt\/cc\/1d\/e4\/cc1de4dffe64e3e1838f9a22c9637d21.png\" alt=\"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u0432 BGAppRefreshTaskRequest \u0432\u0437\u044f\u0442\u043e \u0437\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0443, \u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u0442\u0438\u043f\u044b \u2014 \u044d\u0442\u043e \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 &lt;\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0439 BGProcessingTaskRequest&gt; \/ &lt;\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0439 BGAppRefreshTaskRequest&gt;\" title=\"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u0432 BGAppRefreshTaskRequest \u0432\u0437\u044f\u0442\u043e \u0437\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0443, \u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u0442\u0438\u043f\u044b \u2014 \u044d\u0442\u043e \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 &lt;\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0439 BGProcessingTaskRequest&gt; \/ &lt;\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0439 BGAppRefreshTaskRequest&gt;\" width=\"1440\" height=\"854\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/extt\/cc\/1d\/e4\/cc1de4dffe64e3e1838f9a22c9637d21.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/extt\/cc\/1d\/e4\/cc1de4dffe64e3e1838f9a22c9637d21.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u0432 <code>BGAppRefreshTaskRequest<\/code> \u0432\u0437\u044f\u0442\u043e \u0437\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0443, \u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u0442\u0438\u043f\u044b \u2014 \u044d\u0442\u043e \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 &lt;\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0439 <code>BGProcessingTaskRequest<\/code>&gt; \/ &lt;\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0439 <code>BGAppRefreshTaskRequest<\/code>&gt;<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f BGTask \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0432 \u0444\u043e\u043d\u0435. \u0412\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043e:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/developer.apple.com\/documentation\/backgroundtasks\/bgapprefreshtask\">BGAppRefreshTask<\/a> \u2014 ~30 \u0441\u0435\u043a\u0443\u043d\u0434;<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/developer.apple.com\/documentation\/backgroundtasks\/bgprocessingtask\">BGProcessingTask<\/a> \u2014 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0443\u0442.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e \u0438\u0441\u0442\u0435\u0447\u0435\u043d\u0438\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442 \u0437\u0430\u0434\u0430\u0447\u0443.<\/p>\n<p>\u0416\u0434\u0430\u0442\u044c, \u043f\u043e\u043a\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0440\u0435\u0448\u0438\u0442 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0444\u043e\u043d\u043e\u0432\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443, \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e. \u0415\u0441\u0442\u044c \u0434\u0432\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0435\u0435 \u0432\u0440\u0443\u0447\u043d\u0443\u044e.<\/p>\n<p><strong>\u0421\u043f\u043e\u0441\u043e\u0431 1: \u0447\u0435\u0440\u0435\u0437 LLDB.<\/strong> \u041e\u043f\u0438\u0441\u0430\u043d \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Apple: <a href=\"https:\/\/developer.apple.com\/documentation\/backgroundtasks\/starting-and-terminating-tasks-during-development#Launch-a-Task\">Starting and Terminating Tasks During Development:<\/a><\/p>\n<ol>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c breakpoint \u0432 \u043a\u043e\u0434\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 <code>submit(_:).<\/code><\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 \u0434\u043e \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0442\u043e\u0447\u043a\u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0412 LLDB \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c:<code> e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWithIdentifier:@\"LocalPush.refresh\"].<\/code><\/p>\n<\/li>\n<li>\n<p>\u0412\u043e\u0437\u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u2014 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0432\u044b\u0437\u043e\u0432\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<\/li>\n<\/ol>\n<p><strong>\u0421\u043f\u043e\u0441\u043e\u0431 2: \u0438\u0437 \u043a\u043e\u0434\u0430 (\u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 API). <\/strong>\u0415\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 API \u0438\u0437 \u043a\u043e\u0434\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u0438\u043d\u0441\u0442\u0430\u043d\u0441 \u0441\u0435\u043b\u0435\u043a\u0442\u043e\u0440\u0430 \u043f\u043e \u0441\u0442\u0440\u043e\u043a\u0435 <code>NSSelectorFromString(\"_simulateLaunchForTaskWithIdentifier:\") <\/code>\u0438 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0435\u0433\u043e \u043d\u0430 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0435 <code>BGTaskScheduler.<\/code><\/p>\n<pre><code class=\"swift\">func simulateBGTask(identifier: String) {\u00a0\u00a0\u00a0\u00a0let selector = NSSelectorFromString(\"_simulateLaunchForTaskWithIdentifier:\")\u00a0\u00a0\u00a0\u00a0BGTaskScheduler.shared.perform(selector, with: identifier)}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 API, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u043f\u0430\u0434\u0430\u0442\u044c \u0432 \u0440\u0435\u043b\u0438\u0437\u043d\u0443\u044e \u0441\u0431\u043e\u0440\u043a\u0443. \u041e\u0431\u0435\u0440\u043d\u0435\u043c \u0432 #if DEBUG:<\/p>\n<pre><code class=\"swift\">#if DEBUG\u00a0\u00a0\u00a0\u00a0simulateBGTask(identifier: \"LocalPush.refresh\")#endif<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u041c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0432 \u0434\u0435\u0431\u0430\u0433 \u043c\u0435\u043d\u044e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0438\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a \u043d\u0443\u0436\u043d\u043e\u0439 Background-\u0442\u0430\u0441\u043a\u0438.<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0421\u043e\u0431\u0435\u0440\u0435\u043c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0432\u0441\u0435 \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0438\u0441\u044c. \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0438 \u0433\u0440\u0430\u0431\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\"><strong>\u2116<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"311\" width=\"311\">\n<p align=\"left\"><strong>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430<\/strong><\/p>\n<\/td>\n<td>\n<p align=\"left\"><strong>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">1<\/p>\n<\/td>\n<td data-colwidth=\"311\" width=\"311\">\n<p align=\"left\">\u0413\u0435\u043e\u043f\u0443\u0448\u0438 \u043d\u0435 \u0432 delivered<\/p>\n<\/td>\n<td>\n<p align=\"left\"><code>UNLocationNotificationTrigger<\/code> \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 <code>getDeliveredNotifications<\/code><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">2<\/p>\n<\/td>\n<td data-colwidth=\"311\" width=\"311\">\n<p align=\"left\">\u0413\u0435\u043e\u043f\u0443\u0448\u0438 \u043d\u0435 \u0443\u0434\u0430\u043b\u044f\u044e\u0442\u0441\u044f<\/p>\n<\/td>\n<td>\n<p align=\"left\"><code>removeDeliveredNotifications<\/code> \u043d\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0430 \u043f\u0443\u0448\u0438 \u0441 \u0433\u0435\u043e\u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043e\u043c<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">3<\/p>\n<\/td>\n<td data-colwidth=\"311\" width=\"311\">\n<p align=\"left\">\u0421\u043c\u0430\u0445\u0438\u0432\u0430\u043d\u0438\u0435 \u0431\u0435\u0437 \u043a\u043e\u043b\u0431\u044d\u043a\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0435 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e, \u0447\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u043c\u0430\u0445\u043d\u0443\u043b \u043f\u0443\u0448<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">4<\/p>\n<\/td>\n<td data-colwidth=\"311\" width=\"311\">\n<p align=\"left\">\u041f\u0430\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 BGTask<\/p>\n<\/td>\n<td>\n<p align=\"left\"><code>register(forTaskWithIdentifier:...)<\/code> \u0441 \u043e\u0434\u043d\u0438\u043c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c \u0434\u0432\u0430\u0436\u0434\u044b \u2014 crash<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">5<\/p>\n<\/td>\n<td data-colwidth=\"311\" width=\"311\">\n<p align=\"left\">BGTask \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u0444\u043e\u043d\u043e\u0432\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043d\u0430 \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0435<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">6<\/p>\n<\/td>\n<td data-colwidth=\"311\" width=\"311\">\n<p align=\"left\">NSE \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445<\/p>\n<\/td>\n<td>\n<p align=\"left\">Notification Service Extension \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0443\u0448\u0435\u0439<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">7<\/p>\n<\/td>\n<td data-colwidth=\"311\" width=\"311\">\n<p align=\"left\">\u041b\u0438\u043c\u0438\u0442\u044b \u0431\u0435\u0437 \u043e\u0448\u0438\u0431\u043e\u043a<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u0440\u0438 \u043f\u0440\u0435\u0432\u044b\u0448\u0435\u043d\u0438\u0438 \u043b\u0438\u043c\u0438\u0442\u0430 <sup>64<\/sup>\u2044<sub>20<\/sub> \u043f\u0443\u0448\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043c\u043e\u043b\u0447\u0430 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u043f\u0443\u0448\u0435\u0439 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"50\" width=\"50\">\n<p align=\"left\">8<\/p>\n<\/td>\n<td data-colwidth=\"311\" width=\"311\">\n<p align=\"left\">\u041e\u0434\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0434\u043b\u044f local \u0438 remote<\/p>\n<\/td>\n<td>\n<p align=\"left\"><code>getDeliveredNotifications<\/code> \u0438 <code>getPendingNotificationRequests<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u0438 local, \u0438 remote-\u043f\u0443\u0448\u0438 \u0432\u043c\u0435\u0441\u0442\u0435<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0443\u0448\u0438 \u2014 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0439, \u043a\u043e\u0433\u0434\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u0430\u043d\u0430\u043b \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d. \u041a\u0430\u043d\u0430\u043b \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u0435\u043d \u0438 \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 APNs-\u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u043d\u043e, \u0435\u0441\u043b\u0438 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0443\u0448\u0438 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u0430\u044f \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0437\u0430\u0434\u0430\u043d\u0438\u0439 \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f.<\/p>\n<p>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0443\u0448\u0438 \u043f\u0440\u0438 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0435 \u0438\u043b\u0438 \u0431\u0430\u043d\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0434\u043b\u044f \u043c\u0430\u0440\u043a\u0435\u0442\u0438\u043d\u0433\u043e\u0432\u044b\u0445 \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u0439 \u0441 \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c \u043f\u043e\u043a\u0430\u0437\u043e\u043c \u0438\u043b\u0438 \u043a\u0430\u043a fallback-\u043a\u0430\u043d\u0430\u043b, \u0435\u0441\u043b\u0438 APNs \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b.<\/p>\n<p>\u0418 \u043d\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f real-time-\u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u0439 (\u0437\u0434\u0435\u0441\u044c \u0431\u0435\u0437 APNs \u043d\u0435 \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c) \u0438\u043b\u0438 \u0435\u0441\u043b\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e remote-\u043f\u0443\u0448\u0435\u0439 \u0438 \u043d\u0435\u0442 \u0440\u0438\u0441\u043a\u0430 \u0438\u0445 \u043f\u043e\u0442\u0435\u0440\u0438.<\/p>\n<p>\u0413\u043b\u0430\u0432\u043d\u044b\u0435 \u0432\u044b\u0432\u043e\u0434\u044b:<\/p>\n<ol>\n<li>\n<p>\u041e\u0447\u0435\u043d\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u0440\u043e\u0434\u0443\u043c\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0443\u0448\u0435\u0439, \u0442\u0430\u043a \u043a\u0430\u043a \u0435\u0441\u0442\u044c \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0435\u0442 \u0442\u044f\u0436\u0435\u043b\u043e \u043e\u0442\u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0431\u0435\u0437 \u0435\u0435 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p>Background Tasks \u2014 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0443\u0448\u0438 \u0432 \u0444\u043e\u043d\u0435, \u043d\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435.<\/p>\n<\/li>\n<li>\n<p>\u0413\u0435\u043e\u043f\u0443\u0448\u0438 \u043a\u0430\u043f\u0440\u0438\u0437\u043d\u044b\u0435: \u043e\u043d\u0438 \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u0443\u0448\u0435\u0439, \u043d\u0435 \u0443\u0434\u0430\u043b\u044f\u044e\u0442\u0441\u044f \u0438\u0437 \u043d\u0435\u0435 \u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u044b 20 \u0448\u0442\u0443\u043a\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0421\u0442\u043e\u0438\u0442 \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u043c\u0435\u0447\u0430\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0443\u0448\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0444\u043b\u0430\u0433\u0430 isLocalPush \u0432 userInfo, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0443\u0448\u0438 \u043e\u0442 remote.<\/p>\n<\/li>\n<\/ol>\n<p>\u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043a\u043e\u043c\u0443-\u043d\u0438\u0431\u0443\u0434\u044c \u043d\u0435 \u043d\u0430\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043d\u0430 \u0442\u0435 \u0436\u0435 \u0433\u0440\u0430\u0431\u043b\u0438 \u0438 \u0432\u044b\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439.<\/p>\n<\/div>\n<p>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/1109814\/\">https:\/\/habr.com\/ru\/articles\/1109814\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u042f \u042e\u0440\u0430 \u0411\u0443\u0447\u0438\u043d, iOS Developer \u043a\u043e\u043c\u0430\u043d\u0434\u044b Anticrisis Core \u0432 \u0422-\u0411\u0430\u043d\u043a\u0435. \u0420\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u043c\u044b \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043a\u0430\u043d\u0430\u043b \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u0438 \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c Apple Push Notification service (APNs).APNs \u2014 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u0430\u043d\u0430\u043b \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u0438 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u043e. \u0412 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u043a\u0430\u043d\u0430\u043b \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c \u0438\u0437-\u0437\u0430 \u0441\u0430\u043d\u043a\u0446\u0438\u0439, \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u043d\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 push-\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f.\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0443\u0448\u0438 \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u043e\u0442 APNs \u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043f\u0440\u044f\u043c\u043e \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0443\u0448\u0438, \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0430\u043d\u0430\u043b\u043e\u0433 APNs \u2014 \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u0437\u0430 \u043f\u0443\u0448\u0430\u043c\u0438 \u0438\u0437 \u0444\u043e\u043d\u0430 \u043a \u0441\u0432\u043e\u0435\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0438 \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435. \u0423 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0443\u0448\u0435\u0439 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u043d\u043e \u0432 \u0440\u044f\u0434\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u044d\u0442\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0434\u043e\u0441\u0442\u0443\u0447\u0430\u0442\u044c\u0441\u044f \u0434\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0444\u043e\u043d\u0435.\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c:\u0447\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0443\u0448\u0438 \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043e\u0442 remote \u0438 \u043a\u043e\u0433\u0434\u0430 \u0438\u0445 \u0441\u0442\u043e\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c;\u043a\u0430\u043a \u0438\u0445 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c;\u043a\u0430\u043a \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0442\u0435\u0440\u044f\u0442\u044c \u043f\u0443\u0448\u0438;\u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Background Tasks \u0434\u043b\u044f \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0444\u043e\u043d\u0435;\u0433\u0440\u0430\u0431\u043b\u0438, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043d\u0430\u0441\u0442\u0443\u043f\u0438\u043b\u0438.\u041c\u043e\u0442\u0438\u0432\u0430\u0446\u0438\u044fA penny saved is a penny got.\u00a0(\u0411\u0435\u043d\u0434\u0436\u0430\u043c\u0438\u043d \u0424\u0440\u0430\u043d\u043a\u043b\u0438\u043d)\u00ab\u0421\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u043b \u2014 \u0441\u0447\u0438\u0442\u0430\u0439, \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u00bb.\u00a0(My perfect simple English)Push-\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u2014 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u0438 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u0432\u043d\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0412 \u0448\u0442\u0430\u0442\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f remote-\u043f\u0443\u0448\u0438 \u0447\u0435\u0440\u0435\u0437 APNs. \u041e\u043d\u0438 \u043d\u0430\u0434\u0435\u0436\u043d\u044b, \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e, \u0438 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043d\u0438\u043c\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c.\u0415\u0441\u043b\u0438 APNs \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b. \u0421\u043e\u0431\u0440\u0430\u043b \u0438\u0445 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435.\u0421\u041c\u0421Local Push\u0418\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u041d\u0443\u0436\u0435\u043d \u0448\u043b\u044e\u0437, \u0434\u043e\u0433\u043e\u0432\u043e\u0440 \u0441 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c\u041d\u0435 \u043d\u0443\u0436\u043d\u0430 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b Apple, \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0437\u0430\u0434\u0430\u043d\u0438\u0439 \u2014 \u043f\u043e \u0436\u0435\u043b\u0430\u043d\u0438\u044e\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c\u0412\u044b\u0441\u043e\u043a\u0430\u044f (\u0437\u0430 \u043a\u0430\u0436\u0434\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435)\u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e (\u043a\u0430\u043d\u0430\u043b \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438)\u0414\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u041d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044fReal-time\u0414\u0430 (\u0441 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430\u043c\u0438)\u041d\u0435\u0442 (\u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0437\u0430\u0440\u0430\u043d\u0435\u0435)\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0442 \u041e\u0421\u041d\u0435\u0442\u0414\u0430 (\u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f iOS)\u041e\u0445\u0432\u0430\u0442\u041b\u044e\u0431\u043e\u0439 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0422\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u0421\u041c\u0421 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0439 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043e\u0439 \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u043e. \u042d\u0442\u043e \u0434\u043e\u0440\u043e\u0433\u043e, \u043d\u0435 \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e, \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0421\u041c\u0421 \u043a\u0430\u043a \u0441\u043f\u0430\u043c. \u041d\u043e \u0442\u0430\u043a\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435.Local Push \u2014 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u043a\u0430\u043d\u0430\u043b \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 \u0432 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e\u043c \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432\u0438\u0434\u0435. \u041f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043c\u0430\u0440\u043a\u0435\u0442\u0438\u043d\u0433\u043e\u0432\u044b\u0445 \u0438 \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u0439, \u043d\u0435 \u0434\u043b\u044f real-time. \u0418\u0437 \u043c\u0438\u043d\u0443\u0441\u043e\u0432: \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0443 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0443\u0448\u0430 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e.\u041a\u043e\u0433\u0434\u0430 \u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442 \u0441\u0430\u043d\u043a\u0446\u0438\u0438 \u0438 \u043e\u043d\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043d\u043e\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 APNs, \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0443\u0448\u0438 \u2014 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0447\u043d\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u044e \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c \u0438\u0437 \u0444\u043e\u043d\u0430. \u041c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0433\u0434\u0430 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430 \u043d\u0443\u0436\u043d\u0430, \u043d\u0430\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0432\u043d\u0435\u0437\u0430\u043f\u043d\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0443 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0443\u0448\u0430\u043c\u0438 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.\u041f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0443\u0448\u0430\u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0443\u0448\u0438, \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0442\u043e\u0442 \u0436\u0435, \u0447\u0442\u043e \u0438 \u0434\u043b\u044f remote:UNUserNotificationCenter.current().requestAuthorization(options: [                                            .alert, .sound, .badge]) { granted, error in\u00a0\u00a0\u00a0\u00a0if let error = error {\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return    }\u00a0\u00a0\u00a0\u00a0if granted {\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ \u041c\u043e\u0436\u043d\u043e \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0443\u0448\u0438\u00a0\u00a0\u00a0\u00a0}}\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u0438\u043d \u0440\u0430\u0437. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u043f\u043e\u0437\u0436\u0435 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043c\u0435\u0442\u043e\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Apple Developer Documentation: requestAuthorization.\u0417\u0430\u043f\u0440\u043e\u0441 \u043e\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u043d\u043e\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c.\u0427\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0443\u0448, \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c UNNotificationRequest \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0432 UNUserNotificationCenter. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043e \u043c\u0435\u0442\u043e\u0434\u0430\u0445 \u043c\u043e\u0436\u043d\u043e \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 Apple UNNotificationRequest, add(_:).import UserNotifications \/\/ 1. \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u043d\u0442let content = UNMutableNotificationContent()content.title = &#171;Hello Everyone&#187;content.body = &#171;\u0421\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u043e Local Push&#187;content.sound = .default \/\/ 2. \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0442\u0440\u0438\u0433\u0433\u0435\u0440 (\u0432\u0440\u0435\u043c\u044f, \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c \u0438\u043b\u0438 \u0433\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u044e)let trigger = UNTimeIntervalNotificationTrigger(    timeInterval: 10,   \/\/ \u0447\u0435\u0440\u0435\u0437 10 \u0441\u0435\u043a\u0443\u043d\u0434    repeats: false  \/\/ \u0431\u0435\u0437 \u043f\u043e\u0432\u0442\u043e\u0440\u0430) \/\/ 3. \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441let identifier = UUID().uuidStringlet request = UNNotificationRequest(    identifier: identifier,    content: content,    trigger: trigger) \/\/ 4. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0446\u0435\u043d\u0442\u0440 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439UNUserNotificationCenter.current().add(request) { error in    if let error = error {        \/\/ \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443    }}API iOS \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u0440\u0438 \u0442\u0438\u043f\u0430 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043e\u0432.\u0422\u0440\u0438\u0433\u0433\u0435\u0440\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044fUNTimeIntervalNotificationTrigger\u0427\u0435\u0440\u0435\u0437 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0432\u0440\u0435\u043c\u0435\u043d\u0438\u041d\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u0447\u0430\u0441UNCalendarNotificationTrigger\u0412 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u0442\u0443 \u0438 \u0432\u0440\u0435\u043c\u044f\u0415\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u044b\u0439 \u043e\u0442\u0447\u0435\u0442 \u0432 09:00UNLocationNotificationTrigger\u041f\u0440\u0438 \u0432\u0445\u043e\u0434\u0435\/\u0432\u044b\u0445\u043e\u0434\u0435 \u0438\u0437 \u0433\u0435\u043e\u0437\u043e\u043d\u044b\u041d\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u043e \u043f\u043e\u043a\u0443\u043f\u043a\u0435 \u043f\u0440\u0438 \u0432\u0445\u043e\u0434\u0435 \u0432 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u041d\u0430 \u043a\u0430\u0436\u0434\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f:64 \u2014 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0443\u0448\u0435\u0439 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0430\u043c\u0438;20 \u2014 \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u043f\u0443\u0448\u0435\u0439 \u0441 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043e\u043c UNLocationNotificationTrigger.\u041d\u0435\u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0438 \u043f\u0440\u0435\u0432\u044b\u0448\u0435\u043d\u0438\u0438 \u043b\u0438\u043c\u0438\u0442\u043e\u0432: \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 64 \u043f\u0443\u0448\u0430 \u0441 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u043c\u0438 \u0434\u0430\u0442\u0430\u043c\u0438 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f, \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u043e\u043b\u0447\u0430 \u043e\u0442\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f. \u041d\u043e, \u0435\u0441\u043b\u0438 \u0443\u043f\u0435\u0440\u0435\u0442\u044c\u0441\u044f \u0432 \u043b\u0438\u043c\u0438\u0442 \u0434\u043b\u044f \u043f\u0443\u0448\u0435\u0439 \u0441 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043e\u043c UNLocationNotificationTrigger, 21 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0439 \u043f\u0443\u0448 \u0441 \u044d\u0442\u0438\u043c \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u043f\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0438 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0441\u0442\u0430\u043d\u0443\u0442\u0441\u044f 20 \u0440\u0430\u043d\u0435\u0435 \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0443\u0448\u0435\u0439. \u041d\u0438 \u0432 \u0442\u043e\u043c \u043d\u0438 \u0434\u0440\u0443\u0433\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 add callback, \u0442\u0430\u043a \u0447\u0442\u043e \u0441\u0442\u043e\u0438\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0443\u0448\u0435\u0439 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e.\u041a\u0430\u043a \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u043f\u0443\u0448 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f\u0421 remote-\u043f\u0443\u0448\u0430\u043c\u0438 \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e: Notification Service Extension (NSE) \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0434 \u043f\u043e\u043a\u0430\u0437\u043e\u043c. \u0421 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0443\u0448\u0430\u043c\u0438 NSE \u043d\u0435 \u043e\u0442\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442. \u041e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0447\u0435\u0440\u0435\u0437 UNUserNotificationCenter. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0432\u0432\u0435\u0441\u0442\u0438 \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u043b\u043e\u0433\u0438\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u0435\u0439 \u043f\u0443\u0448\u0435\u0439 (\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0438 \u0440\u0435\u043c\u043e\u0443\u0442) \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.\u041e\u0447\u0435\u0440\u0435\u0434\u044c \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0443\u0448\u0435\u0439. \u0422\u0430\u043c \u043f\u0443\u0448\u0438 \u043e\u0436\u0438\u0434\u0430\u044e\u0442, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0441\u0442\u0443\u043f\u0438\u0442 \u043c\u043e\u043c\u0435\u043d\u0442, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043e\u043d\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f. \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a \u043d\u0438\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043c\u043e\u0436\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 getPendingNotificationRequests:let notificationCenter = UNUserNotificationCenter.current() \/\/ \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435, \u043d\u043e \u0435\u0449\u0435 \u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0443\u0448\u0438notificationCenter.getPendingNotificationRequests { requests in    for request in requests {        print(&#171;\u041e\u0436\u0438\u0434\u0430\u0435\u0442: \\(request.identifier), \u0442\u0440\u0438\u0433\u0433\u0435\u0440: \\(request.trigger.debugDescription)&#187;)    }}\u041e\u0447\u0435\u0440\u0435\u0434\u044c \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u0443\u0448\u0435\u0439. \u042d\u0442\u043e \u043f\u0443\u0448\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0438 \u0436\u0434\u0443\u0442, \u043f\u043e\u043a\u0430 \u043e\u043d \u0441 \u043d\u0438\u043c\u0438 \u043f\u0440\u043e\u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442. \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a \u043d\u0438\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043c\u043e\u0436\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 getDeliveredNotifications:let notificationCenter = UNUserNotificationCenter.current()\/\/ \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0443\u0448\u0438 (\u0442\u0435, \u0447\u0442\u043e \u0432\u0438\u0441\u044f\u0442 \u0432 \u0426\u0435\u043d\u0442\u0440\u0435 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439)notificationCenter.getDeliveredNotifications { notifications in\u00a0\u00a0\u00a0\u00a0for notification in notifications {\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0print(&#171;\u0414\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d: \\(notification.request.identifier)&#187;)\u00a0\u00a0\u00a0\u00a0}}\u0421\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u044d\u0442\u0438\u0445 \u043e\u0447\u0435\u0440\u0435\u0434\u0435\u0439, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u043f\u0443\u0448\u0438 \u0443\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b, \u0430 \u043a\u0430\u043a\u0438\u0435 \u0435\u0449\u0435 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u0438.\u0414\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0433\u0435\u043e\u043f\u0443\u0448\u0435\u0439 \u043d\u0443\u0436\u0435\u043d \u0435\u0449\u0435 \u0437\u0430\u043f\u0440\u043e\u0441 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u0433\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u0438 \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 While Using, \u0438\u043d\u0430\u0447\u0435 \u0442\u0430\u043a\u0438\u0435 \u043f\u0443\u0448\u0438 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u0441\u043e\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0430 UNLocationNotificationTrigger.\u0417\u0430\u043f\u0440\u043e\u0441 \u043e\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u0433\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c.\u041f\u0443\u0448\u0438 \u0441 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043e\u043c UNLocationNotificationTrigger \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0432 getDeliveredNotifications. \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0445, \u043d\u043e \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043e\u043d\u0438 \u043d\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f.\u041a\u0430\u043a \u043e\u0442\u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0443 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u0443\u0448\u0430:\u041f\u043e \u043f\u0440\u043e\u043f\u0430\u0436\u0435 \u0438\u0437 pending. \u0415\u0441\u043b\u0438 \u043f\u0443\u0448 \u0441 \u0433\u0435\u043e\u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043e\u043c \u0431\u044b\u043b \u0432 \u0441\u0442\u0430\u0442\u0443\u0441\u0435 planned \u0438 \u043f\u0440\u043e\u043f\u0430\u043b \u0438\u0437 getPendingNotificationRequests, \u0437\u043d\u0430\u0447\u0438\u0442, \u043e\u043d \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d. \u041f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u043c \u0432 delivered. \u042d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u043c\u044b \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0443\u0448\u0435\u0439 \u0438\u0437 \u043e\u0447\u0435\u0440\u0435\u0434\u0438.Core Location. \u041c\u043e\u0436\u043d\u043e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0432\u0445\u043e\u0434 \u0438 \u0432\u044b\u0445\u043e\u0434 \u0438\u0437 \u0433\u0435\u043e\u0437\u043e\u043d\u044b \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0438 \u0441\u0432\u0435\u0440\u044f\u0442\u044c \u0441 \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u0443\u0448\u0430\u043c\u0438. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u044d\u0442\u043e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c.\u041c\u043e\u0436\u043d\u043e \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0438\u0442\u044c \u0433\u0435\u043e\u043f\u0443\u0448 \u043d\u0430 \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0435\u0433\u043e \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0443 \u0447\u0435\u0440\u0435\u0437 \u043c\u0435\u043d\u044e Features \u2192 Location \u2192 Custom Location.\u0412\u0432\u043e\u0434 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0432 Simulator\u0412\u044b\u0431\u043e\u0440 \u043c\u0435\u043d\u044e Features\u00a0\u2192 Location \u0432 \u0442\u0443\u043b\u0431\u0430\u0440\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Simulator.\u0412\u044b\u0431\u043e\u0440 \u043c\u0435\u043d\u044e\u00a0Custom Location.\u0412\u0432\u043e\u0434 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u0432\u00a0Custom Location.\u0416\u043e\u043d\u0433\u043b\u0438\u0440\u0443\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438, \u043c\u043e\u0436\u043d\u043e \u044d\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0432\u0445\u043e\u0434\u0430 \u0438 \u0432\u044b\u0445\u043e\u0434\u0430 \u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u043b\u043e\u043a\u0430\u0446\u0438\u044e \u0438 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0438\u0442\u044c \u0433\u0435\u043e\u043f\u0443\u0448\u0438.\u041a\u0430\u043a \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u0441 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u043f\u0443\u0448\u0435\u043c\u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u043c\u0430\u0445\u043d\u0443\u043b \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u0443\u0448 \u0438\u0437 \u0426\u0435\u043d\u0442\u0440\u0430 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439, \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u0442 \u043e\u0431 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u041f\u0443\u0448 \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u0447\u0435\u0437\u0430\u0435\u0442 \u0438\u0437 getDeliveredNotifications.\u041f\u0440\u0438 \u0442\u0430\u043f\u0435 \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0443\u0448 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 \u0442\u0435 \u0436\u0435 \u043c\u0435\u0442\u043e\u0434\u044b UNUserNotificationCenterDelegate, \u0447\u0442\u043e \u0438 remote-\u043f\u0443\u0448\u0438:func userNotificationCenter(\u00a0\u00a0\u00a0\u00a0_ center: UNUserNotificationCenter,\u00a0\u00a0\u00a0\u00a0didReceive response: UNNotificationResponse,\u00a0\u00a0\u00a0\u00a0withCompletionHandler completionHandler: @escaping () -&gt; Void) {\u00a0\u00a0\u00a0\u00a0let isLocalPush = response.notification.request.content.userInfo[&#171;isLocalPush&#187;] as? Bool ?? false\u00a0\u00a0\u00a0\u00a0\/\/ &#8230;\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430\u00a0\u00a0\u00a0\u00a0completionHandler()}\u0422\u0430\u043a \u043a\u0430\u043a \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0438 remote-\u043f\u0443\u0448\u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u0432 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u0434\u0435\u043b\u0435\u0433\u0430\u0442, \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u043f\u043e\u0441\u043e\u0431 \u0438\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0442\u044c. \u041f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u043b\u0430\u0433 \u0432 userInfo:content.userInfo = [&#171;isLocalPush&#187;: true]\u0422\u043e\u0433\u0434\u0430 \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u043e\u0442\u043a\u0443\u0434\u0430 \u043f\u0440\u0438\u0448\u0435\u043b \u043f\u0443\u0448.\u041a\u0430\u043a \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0443\u0448\u0438\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0443\u0448\u0438 \u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0438\u0437 \u043e\u0431\u0435\u0438\u0445 \u043e\u0447\u0435\u0440\u0435\u0434\u0435\u0439. \u0418\u0437\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u043e \u043c\u0435\u0442\u043e\u0434\u0430\u0445 \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0443\u0448\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 Apple:\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0438\u0437 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0443\u0448\u0435\u0439 \u2014 removePendingNotificationRequests(withIdentifiers:);\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0438\u0437 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u0443\u0448\u0435\u0439 \u2014 removeDeliveredNotifications(withIdentifiers:).let center = UNUserNotificationCenter.current()\/\/ \u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u0437 \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445center.removePendingNotificationRequests(withIdentifiers: [&#171;id1&#187;, &#171;id2&#187;])\/\/ \u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u0437 \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445center.removeDeliveredNotifications(withIdentifiers: [&#171;id1&#187;, &#171;id2&#187;])\u0415\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u043f\u0443\u0448\u0435\u0439 \u0441\u0440\u0430\u0437\u0443 (removeAllPendingNotificationRequests, removeAllDeliveredNotifications), \u043d\u043e \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0443\u0448\u0435\u0439 \u043e\u043d\u0438 \u043e\u043f\u0430\u0441\u043d\u044b: \u043c\u043e\u0433\u0443\u0442 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438 remote-\u043f\u0443\u0448\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0442\u043e\u0436\u0435 \u0445\u0440\u0430\u043d\u0438\u0442 \u0432 \u044d\u0442\u0438\u0445 \u043e\u0447\u0435\u0440\u0435\u0434\u044f\u0445.\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435: \u043f\u0443\u0448\u0438 \u0441 UNLocationNotificationTrigger \u043d\u0435\u043b\u044c\u0437\u044f \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u0437 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u2014 \u043c\u0435\u0442\u043e\u0434 removeDeliveredNotifications \u043d\u0430 \u043d\u0438\u0445 \u043d\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442.\u0421\u0442\u0430\u0442\u0443\u0441\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c\u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0435 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445:\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u043c\u0430\u0445\u043d\u0443\u043b \u043f\u0443\u0448 \u2014 \u043d\u0435\u0442 \u043a\u043e\u043b\u0431\u044d\u043a\u0430;\u0433\u0435\u043e\u043f\u0443\u0448 \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u2014 \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-503970","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/503970","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=503970"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/503970\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=503970"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=503970"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=503970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}