{"id":11605,"date":"2019-12-02T19:04:02","date_gmt":"2019-12-02T19:04:02","guid":{"rendered":"https:\/\/bestkora.com\/IosDeveloper\/?p=11605"},"modified":"2020-02-29T12:49:10","modified_gmt":"2020-02-29T12:49:10","slug":"modern-networking-in-swift-5-with-urlsession-combine-and-codable","status":"publish","type":"post","link":"https:\/\/bestkora.com\/IosDeveloper\/modern-networking-in-swift-5-with-urlsession-combine-and-codable\/","title":{"rendered":"\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 Swift 5 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Combine \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0435\u0433\u043e \u0432 SwiftUI. \u0427\u0430\u0441\u0442\u044c 1. \u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0444\u0438\u043b\u044c\u043c\u043e\u0432."},"content":{"rendered":"<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-02-29-at-15.47.28.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-12101 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-02-29-at-15.47.28.png\" alt=\"\" width=\"1400\" height=\"1388\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-02-29-at-15.47.28.png 1400w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-02-29-at-15.47.28-150x150.png 150w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-02-29-at-15.47.28-300x297.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-02-29-at-15.47.28-768x761.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-02-29-at-15.47.28-1024x1015.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-02-29-at-15.47.28-303x300.png 303w\" sizes=\"auto, (max-width: 1400px) 100vw, 1400px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 <code>HTTP<\/code> \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 &#8212; \u044d\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0432\u0430\u0436\u043d\u044b\u0445 \u043d\u0430\u0432\u044b\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0440\u0438 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0438 <code>iOS<\/code>. \u0412 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u043d\u043d\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 <code>Swift<\/code> ( \u0434\u043e \u0432\u0435\u0440\u0441\u0438\u0438 5) \u0432\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043b\u0438 \u0432\u044b \u044d\u0442\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b &#171;\u0441 \u043d\u0443\u043b\u044f&#187; \u0438\u043b\u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0433\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 <code>Alamofire<\/code>,\u00a0 \u0432\u044b \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u0438 \u0437\u0430\u043f\u0443\u0442\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441 <code>callback<\/code> \u0442\u0438\u043f\u0430\u00a0<code><span style=\"color: #0000ff;\">completionHandler: @escaping(Result&lt;T, APIError&gt;) -&gt; Void<\/span><\/code>.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u041f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 <code>Swift 5<\/code> \u043d\u043e\u0432\u043e\u0433\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f\u00a0<code>Combine<\/code>\u00a0\u0432 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0438 \u0441 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 <code>URLSession<\/code> \u0438 <code>Codable<\/code> \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0430\u043c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043e\u0447\u0435\u043d\u044c \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u00ab\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u0435\u0439\u00bb\u00a0<code><span style=\"color: #0000ff;\">Publisher<\/span><\/code>\u00a0\u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043b\u0435\u0433\u043a\u043e \u00ab\u043f\u043e\u0434\u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f\u00bb \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 <code>UI<\/code> \u043a\u0430\u043a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e\u00a0<code>UIKit<\/code>, \u0442\u0430\u043a \u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e\u00a0<code>SwiftUI<\/code>. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0412\u00a0<code>SwiftUI<\/code>\u00a0\u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u043d\u043e, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0441\u043a\u0430\u0437\u0430\u0442\u044c &#171;\u0444\u0430\u043d\u0442\u0430\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438&#187;, \u0442\u0430\u043a \u043a\u0430\u043a \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u00a0<code><span style=\"color: #0000ff;\">View<\/span><\/code> \u0432 <code>SwiftUI<\/code> \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e\u00a0<code><span style=\"color: #0000ff;\">ObservableObject<\/span><\/code> \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0441\u00a0<code><span style=\"color: #0000ff;\">@Published<\/span><\/code>\u00a0\u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445\u00a0<code>SwiftUI<\/code> \u0410\u0412\u0422\u041e\u041c\u0410\u0422\u0418\u0427\u0415\u0421\u041a\u0418 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u0442 \u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e &#171;\u043f\u0435\u0440\u0435\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u0435\u0442&#187;\u00a0<code><span style=\"color: #0000ff;\">View<\/span><\/code>. \u0412 \u044d\u0442\u0438\u00a0<code><span style=\"color: #0000ff;\">ObservableObject<\/span><\/code> \u043a\u043b\u0430\u0441\u0441\u044b \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043b\u043e\u0436\u0438\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u0443\u044e \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u044d\u0442\u0438\u0445\u00a0\u00a0<code><span style=\"color: #0000ff;\">@Published<\/span><\/code>\u00a0\u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u043c\u043e\u0433\u0443\u0442 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0442\u0430\u043a\u0438\u043c\u0438 &#171;\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c\u0438&#187; \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 (<code>UI<\/code>) \u043a\u0430\u043a \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u043f\u043e\u043b\u044f <code><span style=\"color: #0000ff;\">TextField<\/span><\/code>, <code><span style=\"color: #0000ff;\">Picker<\/span><\/code>, <code><span style=\"color: #0000ff;\">Stepper<\/span><\/code>, <code><span style=\"color: #0000ff;\">Toggle<\/span><\/code> \u0438 \u0442.\u0434. \u0414\u0440\u0443\u0433\u0438\u0435\u00a0<code><span style=\"color: #0000ff;\">@Published<\/span><\/code>\u00a0\u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, \u043d\u0430\u043f\u0440\u043e\u0442\u0438\u0432, \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c &#171;\u043f\u0430\u0441\u0441\u0438\u0432\u043d\u044b\u043c\u0438&#187;, \u044f\u0432\u043b\u044f\u044f\u0441\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u0438\/ \u0438\u043b\u0438 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0439 &#171;\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445&#187;\u00a0<code><span style=\"color: #0000ff;\">@Published<\/span><\/code>\u00a0\u0441\u0432\u043e\u0439\u0441\u0442\u0432, \u043d\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043d\u0438 \u0442\u043e \u043d\u0430\u0441 \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442. \u041e\u043d\u0438 \u043e\u0431\u044b\u0447\u043d\u043e \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0432\u00a0<code>SwiftUI<\/code>\u00a0\u0442\u0430\u043a\u0438\u043c\u0438 \u043f\u0430\u0441\u0441\u0438\u0432\u043d\u044b\u043c\u0438\u00a0 (<code>UI<\/code>) \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438, \u043a\u0430\u043a \u0442\u0435\u043a\u0441\u0442\u00a0<code><span style=\"color: #0000ff;\">Text<\/span><\/code>, \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u00a0<code><span style=\"color: #0000ff;\">Image<\/span><\/code>, \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0444\u0438\u0433\u0443\u0440\u044b \u0438 \u0442.\u0434. \u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c\u00a0&#171;\u043f\u0430\u0441\u0441\u0438\u0432\u043d\u044b\u0445&#187;\u00a0<code><span style=\"color: #0000ff;\">@Published<\/span><\/code>\u00a0\u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u043e\u0442\u00a0&#171;\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445&#187;\u00a0<code><span style=\"color: #0000ff;\">@Published<\/span><\/code>\u00a0\u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>Combine<\/code><\/span><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0427\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043e \u0447\u0451\u043c \u0438\u0434\u0435\u0442 \u0440\u0435\u0447\u044c, \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b. \u0421\u0435\u0439\u0447\u0430\u0441 \u043c\u043d\u043e\u0433\u0438\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0442\u0438\u043f\u0430\u00a0\u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0444\u0438\u043b\u044c\u043c\u043e\u0432\u00a0<a href=\"https:\/\/developers.themoviedb.org\/3\/getting-started\/introduction\">TMDb<\/a> \u0438\u043b\u0438 \u0430\u0433\u0440\u0435\u0433\u0430\u0442\u043e\u0440\u043e\u0432 \u043d\u043e\u0432\u043e\u0441\u0442\u0435\u0439\u00a0<a href=\"https:\/\/newsapi.org\/\">NewsAPI.org<\/a>\u00a0\u0438 <a href=\"https:\/\/news.ycombinator.com\/\">Hacker News<\/a>\u00a0\u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0444\u0438\u043b\u044c\u043c\u043e\u0432 \u0438\u043b\u0438 \u043d\u0430\u0431\u043e\u0440\u044b \u0441\u0442\u0430\u0442\u0435\u0439 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0432\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0444\u0438\u043b\u044c\u043c\u043e\u0432\u00a0\u00a0<a href=\"https:\/\/developers.themoviedb.org\/3\/getting-started\/introduction\">TMDb<\/a> \u044d\u0442\u043e \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c\u00a0<\/span><span style=\"font-weight: 400;\">\u0444\u0438\u043b\u044c\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0434\u0443\u0442 \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432 \u043a\u0438\u043d\u043e\u0442\u0435\u0430\u0442\u0440\u0430\u0445, \u0438\u043b\u0438\u00a0<\/span><span style=\"font-weight: 400;\">\u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0444\u0438\u043b\u044c\u043c\u044b, \u0438\u043b\u0438 \u0442<\/span><span style=\"font-weight: 400;\">\u043e\u043f\u043e\u0432\u044b\u0435 \u0444\u0438\u043b\u044c\u043c\u044b,\u00a0 \u0438\u043b\u0438\u00a0<\/span><span style=\"font-weight: 400;\">\u0444\u0438\u043b\u044c\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043a\u043e\u0440\u043e \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435\u00a0 \u0430\u0433\u0440\u0435\u0433\u0430\u0442\u043e\u0440\u043e\u0432 \u043d\u043e\u0432\u043e\u0441\u0442\u0435\u0439\u00a0<a href=\"https:\/\/newsapi.org\/\">NewsAPI.org<\/a>\u00a0\u0438 <a href=\"https:\/\/news.ycombinator.com\/\">Hacker News<\/a> \u044d\u0442\u043e \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0441\u0442\u0438, \u0438\u043b\u0438 \u043d\u043e\u0432\u043e\u0441\u0442\u0438 \u0432 \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 &#8212; &#171;\u0441\u043f\u043e\u0440\u0442&#187;, &#171;\u0437\u0434\u043e\u0440\u043e\u0432\u044c\u0435&#187;, &#171;\u043d\u0430\u0443\u043a\u0430&#187;, &#171;\u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438&#187;, &#171;\u0431\u0438\u0437\u043d\u0435\u0441&#187;, \u0438\u043b\u0438 \u043d\u043e\u0432\u043e\u0441\u0442\u0438 \u043e\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 &#171;CNN&#187;, &#171;ABC news&#187;, &#171;Bloomberg&#187; \u0438 \u0442.\u0434., \u0438\u043b\u0438 \u043d\u043e\u0432\u043e\u0441\u0442\u0438, \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u044e\u0449\u0438\u0435 \u043a\u0430\u043a\u043e\u043c\u0443-\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u043c\u0443 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044e. \u0421\u0432\u043e\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0432\u044b \u043e\u0431\u044b\u0447\u043d\u043e &#171;\u0432\u044b\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442&#187; \u0432 \u0432\u0438\u0434\u0435 <code><span style=\"color: #0000ff;\">Endpoint<\/span><\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u0434\u043b\u044f \u0432\u0430\u0441 \u043d\u0443\u0436\u043d\u044b\u0439 <code>URL<\/code>.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0422\u0430\u043a \u0432\u043e\u0442, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u00a0<code>Combine<\/code>, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u00a0<code><span style=\"color: #0000ff;\">ObservableObject<\/span><\/code> \u043a\u043b\u0430\u0441\u0441\u0430\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0447\u0435\u043d\u044c \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 (\u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 10-12 \u0441\u0442\u0440\u043e\u043a) \u043e\u0434\u043d\u043e\u043a\u0440\u0430\u0442\u043d\u043e \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0443\u044e \u0438\/\u0438\u043b\u0438 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0443\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0441\u043f\u0438\u0441\u043a\u0430 \u0444\u0438\u043b\u044c\u043c\u043e\u0432 \u0438\u043b\u0438 \u0441\u0442\u0430\u0442\u0435\u0439 (\u043a\u0430\u043a &#171;\u043f\u0430\u0441\u0441\u0438\u0432\u043d\u044b\u0445&#187;\u00a0<code><span style=\"color: #0000ff;\">@Published<\/span><\/code>\u00a0\u0441\u0432\u043e\u0439\u0441\u0442\u0432) \u043e\u0442\u00a0<code><span style=\"color: #0000ff;\">Endpoint<\/span><\/code>\u00a0(\u043a\u0430\u043a &#171;\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445&#187;\u00a0<code><span style=\"color: #0000ff;\">@Published<\/span><\/code>\u00a0\u0441\u0432\u043e\u0439\u0441\u0442\u0432) \u0432 \u0432\u0438\u0434\u0435 &#171;\u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438&#187;, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0438 \u0432\u0441\u0435\u0433\u043e &#171;\u0436\u0438\u0437\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430&#187; \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430\u00a0<code><span style=\"color: #0000ff;\">ObservableObject <\/span><\/code> \u043a\u043b\u0430\u0441\u0441\u0430. \u0410 \u0434\u0430\u043b\u0435\u0435 \u0432 <code>SwiftUI<\/code>\u00a0\u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u043c, \u0447\u0442\u043e \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0442\u043e \u0435\u0441\u0442\u044c \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u0443\u044e \u0432\u0430\u043c\u00a0<code><span style=\"color: #0000ff;\">Endpoint<\/span><\/code>: \u0442\u043e \u043b\u0438 \u044d\u0442\u043e \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0444\u0438\u043b\u044c\u043c\u044b, \u0438\u043b\u0438 \u0444\u0438\u043b\u044c\u043c\u044b, \u0438\u0434\u0443\u0449\u0438\u0435 \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435,\u00a0 \u0442\u043e \u043b\u0438 \u044d\u0442\u043e \u0431\u0443\u0434\u0443\u0442 \u0441\u0442\u0430\u0442\u044c\u0438 \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c\u0438 \u043d\u043e\u0432\u043e\u0441\u0442\u044f\u043c\u0438 \u0438\u043b\u0438 \u0441\u0442\u0430\u0442\u044c\u0438 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 &#171;\u0437\u0434\u043e\u0440\u043e\u0432\u044c\u0435&#187;. \u041f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0444\u0438\u043b\u044c\u043c\u043e\u0432 \u0438\u043b\u0438 \u0441\u0442\u0430\u0442\u0435\u0439 \u043d\u0430 \u0432\u0430\u0448\u0435\u043c <code>UI<\/code>\u00a0\u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0410\u0412\u0422\u041e\u041c\u0410\u0422\u0418\u0427\u0415\u0421\u041a\u0418 \u044d\u0442\u0438\u043c\u0438\u00a0<code><span style=\"color: #0000ff;\">ObservableObject<\/span><\/code> \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438 \u0438 \u0438\u0445 \u043f\u0430\u0441\u0441\u0438\u0432\u043d\u044b\u043c\u0438\u00a0<code><span style=\"color: #0000ff;\">@Published<\/span><\/code>\u00a0\u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438.\u00a0 \u0412 \u043a\u043e\u0434\u0435 <code>SwiftUI<\/code>\u00a0\u0443 \u0432\u0430\u0441 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438\u00a0 \u044f\u0432\u043d\u043e \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u0444\u0438\u043b\u044c\u043c\u043e\u0432 \u0438\u043b\u0438 \u0441\u0442\u0430\u0442\u0435\u0439, \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u043c, \u0427\u0422\u041e \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0447\u0435\u0440\u0435\u0437\u00a0<code><span style=\"color: #0000ff;\">Endpoint<\/span><\/code>, \u0432\u043e\u0432\u0441\u0435 \u043d\u0435 \u0437\u0430\u0431\u043e\u0442\u044f\u0441\u044c \u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435, \u0438\u0431\u043e \u043e\u043d \u0412\u0421\u0415\u0413\u0414\u0410 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u0438 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u043c \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0440\u0430\u0431\u043e\u0442\u0435<\/span><span style=\"font-weight: 400;\">\u00a0<code><span style=\"color: #0000ff;\">ObservableObject<\/span><\/code> \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u0440\u043e\u043b\u044c <code>View Model<\/code>.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u042f \u043d\u0430 \u0442\u0440\u0435\u0445 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u00a0<code>Combine<\/code> \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f <code>HTTP<\/code> \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0445 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u00a0<code>View Model<\/code> \u0432 <code>SwiftUI<\/code>. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0444\u0438\u043b\u044c\u043c\u043e\u0432\u00a0<a href=\"https:\/\/developers.themoviedb.org\/3\/getting-started\/introduction\">TMDb<\/a>, \u0430 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c &#8212; \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0430\u0433\u0440\u0435\u0433\u0430\u0442\u043e\u0440\u0430\u043c\u0438 \u043d\u043e\u0432\u043e\u0441\u0442\u0435\u0439\u00a0<a href=\"https:\/\/newsapi.org\/\">NewsAPI.org<\/a>\u00a0\u0438 <a href=\"https:\/\/news.ycombinator.com\/\">Hacker News<\/a>. \u0412\u043e \u0432\u0441\u0435\u0445 \u0442\u0440\u0435\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0431\u0443\u0434\u0435\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043e\u0434\u043d\u0430 \u0438 \u0442\u0430 \u0436\u0435 \u0441\u0445\u0435\u043c\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f\u00a0<code>Combine<\/code> , \u0438\u0431\u043e \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0421\u041f\u0418\u0421\u041a\u0418 \u0444\u0438\u043b\u044c\u043c\u043e\u0432 \u0438\u043b\u0438 \u0441\u0442\u0430\u0442\u0435\u0439, \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0430\u044e\u0449\u0438\u0435 \u0438\u0445 &#171;\u041a\u0410\u0420\u0422\u0418\u041d\u041a\u0418&#187; (<code>images<\/code>), \u0418\u0421\u041a\u0410\u0422\u042c \u0432 \u0431\u0430\u0437\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0443\u0436\u043d\u044b\u0435 \u0444\u0438\u043b\u044c\u043c\u044b \u0438\u043b\u0438 \u0441\u0442\u0430\u0442\u044c\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u041f\u0440\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c \u0442\u0438\u043f\u0430 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0444\u0438\u043b\u044c\u043c\u043e\u0432\u00a0<a href=\"https:\/\/developers.themoviedb.org\/3\/getting-started\/introduction\">TMDb<\/a>\u00a0\u0438\u043b\u0438 \u0430\u0433\u0440\u0435\u0433\u0430\u0442\u043e\u0440\u043e\u0432 \u043d\u043e\u0432\u043e\u0441\u0442\u0435\u0439\u00a0<a href=\"https:\/\/newsapi.org\/\">NewsAPI.org<\/a>\u00a0\u0438 <a href=\"https:\/\/news.ycombinator.com\/\">Hacker News<\/a>\u00a0\u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0432\u044b \u0437\u0430\u0434\u0430\u043b\u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 <code>API-key<\/code> \u0438\u043b\u0438 \u043f\u0440\u0435\u0432\u044b\u0441\u0438\u043b\u0438 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438\u043b\u0438 \u0435\u0449\u0435 \u0447\u0442\u043e-\u0442\u043e.\u00a0<\/span><span style=\"font-weight: 400;\">\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u043e\u0448\u0438\u0431\u043a\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430. \u0418\u043d\u0430\u0447\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u043f\u0430\u0434\u0451\u0442 \u0432 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e, \u043a\u043e\u0433\u0434\u0430 \u0432\u0434\u0440\u0443\u0433 \u043d\u0438 \u0441 \u0442\u043e\u0433\u043e, \u043d\u0438 \u0441 \u0441\u0435\u0433\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u0443\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a\u0438\u0435-\u043b\u0438\u0431\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u043f\u043e\u043b\u043d\u043e\u043c \u043d\u0435\u0434\u043e\u0443\u043c\u0435\u043d\u0438\u0438 \u0441 \u043f\u0443\u0441\u0442\u044b\u043c \u044d\u043a\u0440\u0430\u043d\u043e\u043c.\u00a0 \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u0434\u043e \u0443\u043c\u0435\u0442\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e\u00a0<code>Combine<\/code>\u00a0\u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 , \u043d\u043e \u0438 \u0441\u043e\u043e\u0431\u0449\u0430\u0442\u044c \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u043f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u043a\u0435. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0443\u0434\u0435\u043b\u0438\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u0432\u00a0<code>Combine<\/code>.<\/span><\/p>\n<p><!--more--><\/p>\n<p><span style=\"font-weight: 400;\">\u041a\u043e\u0434 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 <a href=\"https:\/\/github.com\/BestKora\/MoviesJSON\">Github<\/a>.<\/span><\/p>\n<h1>\u041c\u043e\u0434\u0435\u043b\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 API \u0441\u0435\u0440\u0432\u0438\u0441\u0430 <a href=\"https:\/\/developers.themoviedb.org\/3\/getting-started\/introduction\">TMDb<\/a><\/h1>\n<p><span style=\"font-weight: 400;\">\u0425\u043e\u0442\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u00a0<a href=\"https:\/\/developers.themoviedb.org\/3\/getting-started\/introduction\">TMDb<\/a> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u043e\u0431\u0448\u0438\u0440\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0444\u0438\u043b\u044c\u043c\u0430\u0445, \u041c\u043e\u0434\u0435\u043b\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0445 \u043d\u0430\u0441 \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0443\u0434\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u043e\u043d\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0444\u0438\u043b\u044c\u043c <code><span style=\"color: #0000ff;\">Movie<\/span><\/code>\u00a0 \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435\u00a0<em>Movie.swift<\/em>:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-16.23.13.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11770 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-16.23.13.png\" alt=\"\" width=\"1010\" height=\"488\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-16.23.13.png 1010w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-16.23.13-300x145.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-16.23.13-768x371.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-16.23.13-500x242.png 500w\" sizes=\"auto, (max-width: 1010px) 100vw, 1010px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0424\u0438\u043b\u044c\u043c <code><span style=\"color: #0000ff;\">Movie<\/span><\/code> \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 <code><span style=\"color: #0000ff;\">id<\/span><\/code>, \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 <code><span style=\"color: #0000ff;\">title<\/span><\/code>, \u043a\u0440\u0430\u0442\u043a\u0443\u044e \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e <code><span style=\"color: #0000ff;\">overview<\/span><\/code>,\u00a0<code>URL<\/code> \u043a\u0438\u043d\u043e\u043f\u043e\u0441\u0442\u0435\u0440\u0430 <code><span style=\"color: #0000ff;\">posterPath<\/span><\/code>\u00a0\u0438 \u0434\u0430\u0442\u0443 \u0432\u044b\u043f\u0443\u0441\u043a\u0430 <code><span style=\"color: #0000ff;\">releaseDate<\/span><\/code>. \u041d\u0430\u0434 \u0444\u0438\u043b\u044c\u043c\u0430\u043c\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430\u0434\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u00a0<code><span style=\"color: #0000ff;\">MovieResponse<\/span><\/code>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <code><span style=\"color: #0000ff;\">results<\/span><\/code>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0444\u0438\u043b\u044c\u043c\u043e\u0432\u00a0<code><span style=\"color: #0000ff;\">[Movie]<\/span><\/code>.\u00a0\u041a\u043e\u0440\u043d\u0435\u0432\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u00a0<code><span style=\"color: #0000ff;\">MoviesResponse<\/span><\/code> \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u00a0<code><span style=\"color: #0000ff;\">Movie<\/span><\/code> \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f <code><span style=\"color: #0000ff;\">Codable<\/span><\/code>, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u0434\u0432\u0443\u043c\u044f \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438 \u043a\u043e\u0434\u0430 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u00a0<code>JSON<\/code> \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u041c\u043e\u0434\u0435\u043b\u044c. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u00a0<code><span style=\"color: #0000ff;\">Movie<\/span><\/code>\u00a0\u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0435\u0449\u0435 \u0438 <code><span style=\"color: #0000ff;\">Identifiable<\/span><\/code>, \u0435\u0441\u043b\u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043e\u0431\u043b\u0435\u0433\u0447\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0444\u0438\u043b\u044c\u043c\u043e\u0432 <code><span style=\"color: #0000ff;\">[Movie]<\/span><\/code> \u0432 \u0432\u0438\u0434\u0435 \u0441\u043f\u0438\u0441\u043a\u0430\u00a0<code><span style=\"color: #0000ff;\">List<\/span><\/code>\u00a0\u0432 <code>SwiftUI<\/code>. \u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b <code><span style=\"color: #0000ff;\">Identifiable<\/span><\/code> \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 <code><span style=\"color: #0000ff;\">id<\/span><\/code>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0443 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c, \u0442\u0430\u043a \u0447\u0442\u043e \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u0438\u043b\u0438\u0439 \u043e\u0442 \u043d\u0430\u0441 \u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u041e\u0431\u044b\u0447\u043d\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0438 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 <a href=\"https:\/\/developers.themoviedb.org\/3\/getting-started\/introduction\">TMDb<\/a>, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u0432\u0441\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 <code>URLs<\/code> \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0442\u0435\u0445 \u0438\u043b\u0438 \u0438\u043d\u044b\u0445 \u043d\u0443\u0436\u043d\u044b\u0445 \u043d\u0430\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u044d\u0442\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430. \u0418\u0445 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 <code><span style=\"color: #0000ff;\">Endpoint<\/span><\/code>. \u0412\u00a0<code>Swift<\/code> \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u043e\u043d\u0438 \u043e\u0444\u043e\u0440\u043c\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f <code><span style=\"color: #0000ff;\">enum Endpoint<\/span><\/code>. \u0412\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435\u00a0<code><span style=\"color: #0000ff;\">enum\u00a0Endpoint<\/span><\/code>, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0435\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c\u00a0<code>URL<\/code>\u00a0\u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445\u00a0<strong><a href=\"https:\/\/developers.themoviedb.org\/3\/getting-started\/introduction?source=post_page-----f7c067c7bb3----------------------\">TMDb<\/a><\/strong>\u00a0\u0437\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u0444\u0438\u043b\u044c\u043c\u043e\u0432 \u0438\u043b\u0438 \u0430\u043a\u0442\u0435\u0440\u043e\u0432:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-16.18.01.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11768 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-16.18.01.png\" alt=\"\" width=\"1074\" height=\"842\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-16.18.01.png 1074w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-16.18.01-300x235.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-16.18.01-768x602.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-16.18.01-1024x803.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-16.18.01-383x300.png 383w\" sizes=\"auto, (max-width: 1074px) 100vw, 1074px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0438\u043b\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0431\u043e\u0440\u044b \u0444\u0438\u043b\u044c\u043c\u043e\u0432: <\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\">\u0444\u0438\u043b\u044c\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0434\u0443\u0442 \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432 \u043a\u0438\u043d\u043e\u0442\u0435\u0430\u0442\u0440\u0430\u0445 &#8212; <code><span style=\"color: #0000ff;\">.nowPlaying<\/span><\/code>,<\/span><\/li>\n<li><span style=\"font-weight: 400;\">\u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0444\u0438\u043b\u044c\u043c\u044b &#8212;\u00a0<code><span style=\"color: #0000ff;\">.popular<\/span><\/code>, <\/span><\/li>\n<li><span style=\"font-weight: 400;\">\u0442\u043e\u043f\u043e\u0432\u044b\u0435 \u0444\u0438\u043b\u044c\u043c\u044b &#8212;\u00a0<code><span style=\"color: #0000ff;\">.topRated<\/span><\/code>, <\/span><\/li>\n<li><span style=\"font-weight: 400;\">\u0444\u0438\u043b\u044c\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043a\u043e\u0440\u043e \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 &#8212;\u00a0<code><span style=\"color: #0000ff;\">.upcoming<\/span><\/code>.<\/span><\/li>\n<li><span style=\"font-weight: 400;\">\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e \u0444\u0438\u043b\u044c\u043c\u043e\u0432, \u0437\u0430\u0434\u0430\u0432\u0430\u044f \u043b\u044e\u0431\u0443\u044e \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0443\u044e\u0441\u044f \u0432 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0438 \u0444\u0438\u043b\u044c\u043c\u0430 &#8212;\u00a0<code><span style=\"color: #0000ff;\">.search (searchString: String)<\/span><\/code>.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">\u041a\u0440\u043e\u043c\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0444\u0438\u043b\u044c\u043c\u043e\u0432, \u0432 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0438 <code><span style=\"color: #0000ff;\">Endpoint<\/span><\/code>\u00a0\u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430\u00a0<code><span style=\"color: #0000ff;\">.credits (movieId: Int)<\/span><\/code> \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0430\u043a\u0442\u0451\u0440\u0441\u043a\u0438\u0439 \u0441\u043e\u0441\u0442\u0430\u0432\u00a0<code><span style=\"color: #0000ff;\">[MovieCast]<\/span><\/code>\u00a0\u0438 \u0441\u044a\u0435\u043c\u043e\u0447\u043d\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443\u00a0<code><span style=\"color: #0000ff;\">[MovieCrew]<\/span><\/code> \u0434\u043b\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0444\u0438\u043b\u044c\u043c\u0430 c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c\u00a0<code><span style=\"color: #0000ff;\">movieId<\/span><\/code>\u00a0:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-16.24.48.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11771 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-16.24.48.png\" alt=\"\" width=\"1052\" height=\"628\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-16.24.48.png 1052w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-16.24.48-300x179.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-16.24.48-768x458.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-16.24.48-1024x611.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-16.24.48-500x298.png 500w\" sizes=\"auto, (max-width: 1052px) 100vw, 1052px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u041e\u043f\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f\u00a0<code><span style=\"color: #0000ff;\">Endpoint<\/span><\/code>\u00a0&#8212; \u044d\u0442\u043e \u0442\u043e, \u0447\u0435\u043c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0436\u0435\u043b\u0430\u0435\u043c\u043e\u0435 &#8212; \u043d\u0443\u0436\u043d\u044b\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u0444\u0438\u043b\u044c\u043c\u043e\u0432 <code>[<span style=\"color: #0000ff;\">Movie]<\/span><\/code>\u00a0\u0438 \u0430\u043a\u0442\u0435\u0440\u043e\u0432<code><span style=\"color: #0000ff;\">[MovieCast]<\/span><\/code>.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0417\u0430\u0434\u0430\u0447\u0435\u0439\u00a0<code>API<\/code>\u00a0(Application Programming Interface) \u0434\u043b\u044f\u00a0 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u00a0<a href=\"https:\/\/developers.themoviedb.org\/3\/getting-started\/introduction\">TMDb<\/a>\u00a0\u043a\u0430\u043a \u0440\u0430\u0437 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0445 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u00a0\u043c\u0430\u0441\u0441\u0438\u0432 \u0444\u0438\u043b\u044c\u043c\u043e\u0432 <code>[<span style=\"color: #0000ff;\">Movie]<\/span><\/code>\u00a0\u0438\u043b\u0438 \u0430\u043a\u0442\u0435\u0440\u043e\u0432 <code><span style=\"color: #0000ff;\">[MovieCast]<\/span><\/code>\u00a0\u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u0442\u043e\u0439 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u043e\u043f\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f\u00a0<code><span style=\"color: #0000ff;\">Endpoint<\/span><\/code>. \u041c\u044b \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u043c \u043d\u0430\u0448 <code>API<\/code> \u0432 \u0444\u0430\u0439\u043b\u0435\u00a0<em>MovieAPI.swift<\/em>. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0426\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e \u043d\u0430\u0448\u0435\u0433\u043e <code>API<\/code>\u00a0\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f\u00a0\u043a\u043b\u0430\u0441\u0441 <code><span style=\"color: #0000ff;\">MovieAPI<\/span><\/code>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0442\u0440\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0431\u0430\u0437\u044b\u00a0<a href=\"https:\/\/developers.themoviedb.org\/3\/getting-started\/introduction\">TMDb<\/a>:<\/span><\/p>\n<ol>\n<li><span style=\"font-weight: 400;\"><code><span style=\"color: #0000ff;\">fetchMovies (from endpoint: Endpoint) -&gt; AnyPublisher&lt;[Movie], Never&gt;\u00a0<\/span><\/code> &#8212;\u00a0\u0432\u044b\u0431\u043e\u0440\u043a\u0430 \u0444\u0438\u043b\u044c\u043c\u043e\u0432 <code>[<span style=\"color: #0000ff;\">Movie]<\/span><\/code> \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <code><span style=\"color: #0000ff;\">endpoint<\/span><\/code>\u00a0,<\/span><\/li>\n<li><span style=\"font-weight: 400;\"><code><span style=\"color: #0000ff;\">fetchCredits (for movieId: Int)\u00a0-&gt; AnyPublisher&lt;[MovieCast], Never&gt;<\/span><\/code> &#8212; \u0432\u044b\u0431\u043e\u0440\u043a\u0430 \u0430\u043a\u0442\u0435\u0440\u043e\u0432 <code><span style=\"color: #0000ff;\">[MovieCast]<\/span><\/code>\u00a0\u0434\u043b\u044f \u0444\u0438\u043b\u044c\u043c\u0430 \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c\u00a0<code><span style=\"color: #0000ff;\">movieId<\/span><\/code>,\u00a0<\/span><\/li>\n<li><span style=\"font-weight: 400;\"><code><span style=\"color: #0000ff;\">fetchMoviesErr (from endpoint: Endpoint) -&gt; AnyPublisher&lt;[Movie], MovieError&gt;<\/span><\/code>\u00a0 &#8212; \u0432\u044b\u0431\u043e\u0440\u043a\u0430 \u0444\u0438\u043b\u044c\u043c\u043e\u0432 <code><span style=\"color: #0000ff;\">[Movie]<\/span><\/code> \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <code><span style=\"color: #0000ff;\">endpoint<\/span><\/code>\u00a0\u0441 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 <code><span style=\"color: #0000ff;\">MovieError<\/span><\/code>.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">\u0412 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 <code>Combine<\/code> \u0432\u0441\u0435 \u044d\u0442\u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u0444\u0438\u043b\u044c\u043c\u043e\u0432 <code><span style=\"color: #0000ff;\">[Movie]<\/span><\/code>\u00a0\u0438\u043b\u0438 \u0430\u043a\u0442\u0435\u0440\u043e\u0432 <code><span style=\"color: #0000ff;\">[MovieCast]<\/span><\/code>, \u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u0435\u0439&#187;\u00a0<code><span style=\"color: #0000ff;\">Publisher<\/span><\/code>. \u041f\u0435\u0440\u0432\u044b\u0435 \u0434\u0432\u0430 \u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f \u043d\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 &#8212; <code><span style=\"color: #0000ff;\">Never<\/span><\/code>, \u0430 \u0435\u0441\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0430 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0438\u043b\u0438 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u0438\u043c\u0435\u043b\u0430 \u043c\u0435\u0441\u0442\u043e, \u0442\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043f\u0443\u0441\u0442\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0444\u0438\u043b\u044c\u043c\u043e\u0432\u00a0<code><span style=\"color: #0000ff;\">[Movie]()<\/span><\/code>\u00a0\u0438\u043b\u0438 \u0430\u043a\u0442\u0435\u0440\u043e\u0432 <code><span style=\"color: #0000ff;\">[MovieCast]()<\/span><\/code> \u0431\u0435\u0437 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u043f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u043f\u0443\u0441\u0442\u044b\u043c\u0438. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439, \u0442\u0440\u0435\u0442\u0438\u0439 \u043c\u0435\u0442\u043e\u0434, \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432 \u0444\u0438\u043b\u044c\u043c\u043e\u0432\u00a0<code><span style=\"color: #0000ff;\">[Movie]<\/span><\/code>, \u043d\u043e \u0438 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0435\u00a0<code><span style=\"color: #0000ff;\">MovieError<\/span><\/code>, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u043d\u0430 (<code>UI)<\/code>.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0414\u043b\u044f \u043e\u0431\u043b\u0435\u0433\u0447\u0435\u043d\u0438\u044f \u0432\u044b\u0431\u043e\u0440\u0430 \u043e\u043f\u0446\u0438\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 <code><span style=\"color: #0000ff;\">Endpoint<\/span><\/code> \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 <code><span style=\"color: #0000ff;\">init?<\/span><\/code>\u00a0 \u0434\u043b\u044f \u0443\u0436\u0435 &#171;\u0433\u043e\u0442\u043e\u0432\u044b\u0445&#187; \u0441\u043f\u0438\u0441\u043a\u043e\u0432 \u0444\u0438\u043b\u044c\u043c\u043e\u0432 (<code><span style=\"color: #0000ff;\">.nowPlaying<\/span><\/code>,\u00a0<code><span style=\"color: #0000ff;\">.popular<\/span><\/code>,\u00a0<code><span style=\"color: #0000ff;\">.topRated<\/span><\/code> \u0438\u043b\u0438 <code><span style=\"color: #0000ff;\">.upcoming<\/span><\/code>) \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 <code><span style=\"color: #0000ff;\">index<\/span><\/code>:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-16.27.08.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11772 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-16.27.08.png\" alt=\"\" width=\"1016\" height=\"326\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-16.27.08.png 1016w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-16.27.08-300x96.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-16.27.08-768x246.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-16.27.08-500x160.png 500w\" sizes=\"auto, (max-width: 1016px) 100vw, 1016px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0412\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u0432 \u043a\u043b\u0430\u0441\u0441 <code><span style=\"color: #0000ff;\">MovieAPI<\/span><\/code>\u00a0\u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043f\u0435\u0440\u0432\u044b\u0439 \u043c\u0435\u0442\u043e\u0434\u00a0<code><span style=\"color: #0000ff;\">fetchMovies (from endpoint: Endpoint)-&gt; AnyPublisher&lt;[Movie], Never&gt;<\/span><\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u0444\u0438\u043b\u044c\u043c\u044b <code><span style=\"color: #0000ff;\">[Movie]<\/span><\/code> \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <code><span style=\"color: #0000ff;\">endpoint<\/span><\/code> \u0438 \u043d\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 <code><span style=\"color: #0000ff;\">Never<\/span><\/code>:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-02-10-at-18.43.00.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11975 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-02-10-at-18.43.00.png\" alt=\"\" width=\"1230\" height=\"534\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-02-10-at-18.43.00.png 1230w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-02-10-at-18.43.00-300x130.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-02-10-at-18.43.00-768x333.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-02-10-at-18.43.00-1024x445.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-02-10-at-18.43.00-500x217.png 500w\" sizes=\"auto, (max-width: 1230px) 100vw, 1230px\" \/><\/a><\/p>\n<ol>\n<li><span style=\"font-weight: 400;\">\u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 <code><span style=\"color: #0000ff;\">endpoint<\/span><\/code>\u00a0\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c <code>URL<\/code> <code><span style=\"color: #0000ff;\">endpoint.absoluteURL<\/span><\/code> \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043d\u0443\u0436\u043d\u043e\u0439 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0444\u0438\u043b\u044c\u043c\u043e\u0432\u00a0\u00a0\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187; <code><span style=\"color: #0000ff;\">dataTaskPublisher(for:)<\/span><\/code>, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <code><span style=\"color: #0000ff;\">Output<\/span><\/code> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u0440\u0442\u0435\u0436 <code><span style=\"color: #0000ff;\">(data: Data, response: URLResponse)<\/span><\/code>, \u0430\u00a0\u043e\u0448\u0438\u0431\u043a\u043e\u0439 <code><span style=\"color: #0000ff;\">Failure<\/span><\/code>\u00a0&#8212;\u00a0<code><span style=\"color: #0000ff;\">URLError<\/span><\/code>,<br \/>\n<\/span><\/li>\n<li><span style=\"font-weight: 400;\">\u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <span style=\"color: #0000ff;\">map { }<\/span> \u0431\u0435\u0440\u0435\u043c \u0438\u0437 \u043a\u043e\u0440\u0442\u0435\u0436\u0430 <code><span style=\"color: #0000ff;\">(data: Data, response: URLResponse)<\/span><\/code> \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0430\u043d\u043d\u044b\u0435\u00a0<code><span style=\"color: #0000ff;\">data<\/span><\/code>,\u00a0<\/span><\/li>\n<li><span style=\"font-weight: 400;\">\u0434\u0435\u043a\u043e\u0434\u0438\u0440\u0443\u0435\u043c <code>JSON<\/code> \u0434\u0430\u043d\u043d\u044b\u0435\u00a0<code><span style=\"color: #0000ff;\">data<\/span><\/code> \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u041c\u043e\u0434\u0435\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439\u00a0<code><span style=\"color: #0000ff;\">MovieResponse<\/span><\/code>, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0444\u0438\u043b\u044c\u043c\u043e\u0432 <code><span style=\"color: #0000ff;\">results:\u00a0[Movie]<\/span><\/code><\/span><\/li>\n<li><span style=\"font-weight: 400;\">\u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code><span style=\"color: #0000ff;\">map { }<\/span><\/code>\u00a0\u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0431\u0435\u0440\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0444\u0438\u043b\u044c\u043c\u0430\u0445 &#8212;\u00a0<code><span style=\"color: #0000ff;\">results<\/span><\/code>,\u00a0<\/span><\/li>\n<li><span style=\"font-weight: 400;\">\u043f\u0440\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0438 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u043e\u0448\u0438\u0431\u043e\u043a \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0448\u0430\u0433\u0430\u0445 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043f\u0443\u0441\u0442\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 <code><span style=\"color: #0000ff;\">[ ]<\/span><\/code>,<\/span><\/li>\n<li><span style=\"font-weight: 400;\">\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430 <code>main<\/code> \u043f\u043e\u0442\u043e\u043a, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 <code>UI<\/code>,<\/span><\/li>\n<li><span style=\"font-weight: 400;\">&#171;\u0441\u0442\u0438\u0440\u0430\u0435\u043c&#187; \u0422\u0418\u041f &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187; \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code><span style=\"color: #0000ff;\">eraseToAnyPublisher()<\/span><\/code> \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 <code><span style=\"color: #0000ff;\">AnyPublisher<\/span><\/code>.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">\u0417\u0430\u0434\u0430\u0447\u0430 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0430\u043a\u0442\u0451\u0440\u0441\u043a\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u0430 \u0432\u043e\u0437\u043b\u043e\u0436\u0435\u043d\u0430 \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u043c\u0435\u0442\u043e\u0434\u00a0<code><span style=\"color: #0000ff;\">fetchCredits (for movieId: Int) -&gt; AnyPublisher&lt;[MovieCast], Never&gt;<\/span><\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u0447\u043d\u043e\u0439 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043a\u043e\u043f\u0438\u0435\u0439 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-16.06.43.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11764 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-16.06.43.png\" alt=\"\" width=\"1168\" height=\"526\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-16.06.43.png 1168w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-16.06.43-300x135.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-16.06.43-768x346.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-16.06.43-1024x461.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-16.06.43-500x225.png 500w\" sizes=\"auto, (max-width: 1168px) 100vw, 1168px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e, \u043a\u0430\u043a \u0438\u0434\u0435\u0442 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>Combine<\/code> &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187; <code><span style=\"color: #0000ff;\">AnyPublisher &lt;[MovieCast], Never&gt;<\/span><\/code>, \u0435\u0441\u043b\u0438 \u043d\u0430\u043c \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0444\u0438\u043b\u044c\u043c\u0430 <code><span style=\"color: #0000ff;\">movieId<\/span><\/code>:<\/span><\/p>\n<ol>\n<li><span style=\"font-weight: 400;\">\u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435\u00a0<code><span style=\"color: #0000ff;\">movieId<\/span><\/code>\u00a0\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c <code>URL<\/code> \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0430\u043a\u0442\u0435\u0440\u0441\u043a\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u0430 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u0438\u043b\u044c\u043c\u0430 <code><span style=\"color: #0000ff;\">Endpoint.credits (movie: movieId)).absoluteURL<\/span><\/code>\u00a0\u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187; <code><span style=\"color: #0000ff;\">dataTaskPublisher(for:)<\/span><\/code>, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <code><span style=\"color: #0000ff;\">Output<\/span><\/code> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u0440\u0442\u0435\u0436 <code><span style=\"color: #0000ff;\">(data: Data, response: URLResponse)<\/span><\/code>, \u0430\u00a0\u043e\u0448\u0438\u0431\u043a\u043e\u0439 <code><span style=\"color: #0000ff;\">Failure<\/span><\/code> &#8212; <code><span style=\"color: #0000ff;\">URLError<\/span><\/code>,<br \/>\n<\/span><\/li>\n<li><span style=\"font-weight: 400;\">\u0431\u0435\u0440\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code><span style=\"color: #0000ff;\">map { }<\/span><\/code> \u0438\u0437 \u043a\u043e\u0440\u0442\u0435\u0436\u0430 <code><span style=\"color: #0000ff;\">(data: Data, response: URLResponse)<\/span><\/code> \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0430\u043d\u043d\u044b\u0435\u00a0<code><span style=\"color: #0000ff;\">data<\/span><\/code>,\u00a0<\/span><\/li>\n<li><span style=\"font-weight: 400;\">\u0434\u0435\u043a\u043e\u0434\u0438\u0440\u0443\u0435\u043c <code>JSON<\/code> \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u041c\u043e\u0434\u0435\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439\u00a0<code><span style=\"color: #0000ff;\">MovieCreditResponse<\/span><\/code>, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0439 \u043a\u0430\u043a \u0430\u043a\u0442\u0451\u0440\u0441\u043a\u0438\u0439 \u0441\u043e\u0441\u0442\u0430\u0432 <code><span style=\"color: #0000ff;\">cast:\u00a0[MovieCast]<\/span><\/code>, \u0442\u0430\u043a \u0438 \u0441\u044a\u0451\u043c\u043e\u0447\u043d\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443 <code><span style=\"color: #0000ff;\">crew:[MovieCast]<\/span><\/code>\u00a0,<\/span><\/li>\n<li><span style=\"font-weight: 400;\">\u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code><span style=\"color: #0000ff;\">map { }<\/span><\/code> \u0431\u0435\u0440\u0435\u043c \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0431 \u0430\u043a\u0442\u0451\u0440\u0441\u043a\u043e\u043c \u0441\u043e\u0441\u0442\u0430\u0432\u0435\u00a0<code><span style=\"color: #0000ff;\">cast<\/span><\/code>,\u00a0<\/span><\/li>\n<li><span style=\"font-weight: 400;\">\u043f\u0440\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0448\u0430\u0433\u0430\u0445 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043f\u0443\u0441\u0442\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 <code><span style=\"color: #0000ff;\">[ ]<\/span><\/code>,<\/span><\/li>\n<li><span style=\"font-weight: 400;\">\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430<code> main<\/code> \u043f\u043e\u0442\u043e\u043a, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 <code>UI<\/code><\/span><\/li>\n<li><span style=\"font-weight: 400;\">&#171;\u0441\u0442\u0438\u0440\u0430\u0435\u043c&#187; \u0422\u0418\u041f &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187; \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code><span style=\"color: #0000ff;\">eraseToAnyPublisher()<\/span><\/code> \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 <code><span style=\"color: #0000ff;\">AnyPublisher<\/span><\/code>.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">\u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043f\u043e\u0447\u0442\u0438 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0430\u044f \u043a\u043e\u043f\u0438\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430\u00a0<code><span style=\"color: #0000ff;\">fetchMovies (from endpoint: Endpoint)-&gt; AnyPublisher&lt;[MovieCast], Never&gt;<\/span><\/code>\u00a0\u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u0432\u043c\u0435\u0441\u0442\u043e \u0444\u0438\u043b\u044c\u043c\u043e\u0432 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0430\u043a\u0442\u0435\u0440\u043e\u0432.\u00a0\u041e\u043d \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u0430\u043c &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187; <code><span style=\"color: #0000ff;\">AnyPublisher &lt;[MovieCast], Never&gt;<\/span><\/code> \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0432 \u0432\u0438\u0434\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0430\u043a\u0442\u0435\u0440\u043e\u0432 <code><span style=\"color: #0000ff;\">[MovieCast]<\/span><\/code>\u00a0\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0438\u00a0<code><span style=\"color: #0000ff;\">Never<\/span><\/code>\u00a0(\u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043f\u0443\u0441\u0442\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0430\u043a\u0442\u0435\u0440\u043e\u0432\u00a0<code><span style=\"color: #0000ff;\">[ ]<\/span><\/code>).<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u041c\u044b \u0432\u044b\u0434\u0435\u043b\u0438\u043c \u043e\u0431\u0449\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u044d\u0442\u0438\u0445 \u0434\u0432\u0443\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043e\u0444\u043e\u0440\u043c\u0438\u043c \u0435\u0435 \u0432 \u0432\u0438\u0434\u0435 <code>Generic<\/code> \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code><span style=\"color: #0000ff;\">fetch(_ url: URL) -&gt; AnyPublisher&lt;T, Error&gt;<\/span><\/code>, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0435\u0439\u00a0<code>Generic<\/code> &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187; <code><span style=\"color: #0000ff;\">AnyPublisher&lt;T, Error&gt;<\/span><\/code> \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 <code>URL<\/code>:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.30.08.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11761 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.30.08.png\" alt=\"\" width=\"1178\" height=\"302\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.30.08.png 1178w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.30.08-300x77.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.30.08-768x197.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.30.08-1024x263.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.30.08-500x128.png 500w\" sizes=\"auto, (max-width: 1178px) 100vw, 1178px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0434\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.25.41.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11760 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.25.41.png\" alt=\"\" width=\"1074\" height=\"946\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.25.41.png 1074w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.25.41-300x264.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.25.41-768x676.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.25.41-1024x902.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.25.41-341x300.png 341w\" sizes=\"auto, (max-width: 1074px) 100vw, 1074px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u0438&#187; \u0441\u0430\u043c\u0438 \u043f\u043e \u0441\u0435\u0431\u0435 &#171;\u043d\u0435 \u0432\u0437\u043b\u0435\u0442\u0430\u044e\u0442&#187;, \u043e\u043d\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 \u043d\u0430 \u043d\u0438\u0445 \u043a\u0442\u043e-\u0442\u043e \u043d\u0435 \u00ab\u043f\u043e\u0434\u043f\u0438\u0448\u0435\u0442\u0441\u044f\u00bb. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043f\u0440\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 <code>UI<\/code>\u00a0\u0432\u00a0<code>SwiftUI<\/code>\u00a0\u0438 &#171;\u043f\u043e\u0434\u043f\u0438\u0448\u0435\u043c\u0441\u044f&#187; \u043d\u0430 \u043d\u0438\u0445 \u0432\u00a0\u00a0<code><span style=\"color: #0000ff;\">ObservableObject<\/span><\/code>\u00a0\u043a\u043b\u0430\u0441\u0441\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0410\u0412\u0422\u041e\u041c\u0410\u0422\u0418\u0427\u0415\u0421\u041a\u0418 \u0421\u0418\u041d\u0425\u0420\u041e\u041d\u0418\u0417\u0418\u0420\u0423\u0415\u0422 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u00a0<code><span style=\"color: #0000ff;\">View<\/span><\/code>.\u00a0<\/span><\/p>\n<h1>&#171;\u0418\u0437\u0434\u0430\u0442\u0435\u043b\u0438&#187; <code><span style=\"color: #0000ff;\">Publisher<\/span><\/code> \u043a\u0430\u043a View Model \u0432 <code>SwiftUI<\/code>. \u0421\u043f\u0438\u0441\u043e\u043a \u0444\u0438\u043b\u044c\u043c\u043e\u0432.<\/h1>\n<p><span style=\"font-weight: 400;\">\u0412 <code>SwiftUI<\/code>\u00a0\u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u0435\u0439 &#171;\u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439&#187;, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0440\u0435\u0430\u0433\u0438\u0440\u0443\u044e\u0442 <code><span style=\"color: #0000ff;\">View<\/span><\/code>, \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u0438&#187; <code><span style=\"color: #0000ff;\">Publisher<\/span><\/code>. \u041f\u043e\u0434 &#171;\u0432\u043d\u0435\u0448\u043d\u0438\u043c\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438&#187; \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u0442\u0430\u0439\u043c\u0435\u0440 <code><span style=\"color: #0000ff;\">Timer<\/span><\/code>, \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u0441\u00a0<code><span style=\"color: #0000ff;\">NotificationCenter<\/span><\/code>\u00a0\u0438\u043b\u0438 \u0432\u0430\u0448 \u043e\u0431\u044a\u0435\u043a\u0442 \u041c\u043e\u0434\u0435\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 <code><span style=\"color: #0000ff;\"> ObservableObject<\/span><\/code> \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 &#171;\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0438\u0441\u0442\u0438\u043d\u044b&#187; (<code>source of truth<\/code>).\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u041d\u0430 \u043e\u0431\u044b\u0447\u043d\u044b\u0445 &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u0435\u0439&#187; \u0442\u0438\u043f\u0430 <code><span style=\"color: #0000ff;\">Timer<\/span><\/code> \u0438\u043b\u0438 <code><span style=\"color: #0000ff;\">NotificationCenter<\/span><\/code> \u00a0\u0432 <code>SwiftUI<\/code>\u00a0<code><span style=\"color: #0000ff;\">View<\/span><\/code> \u0440\u0435\u0430\u0433\u0438\u0440\u0443\u0435\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 <code><span style=\"color: #0000ff;\">onReceive (_: perform:)<\/span><\/code>. \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f\u00a0&#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187; <code><span style=\"color: #0000ff;\">Timer<\/span><\/code> \u043c\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u043f\u043e\u0437\u0436\u0435, \u0432 \u0442\u0440\u0435\u0442\u044c\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u043c\u0441\u044f \u043d\u0430 \u0442\u043e\u043c, \u043a\u0430\u043a<\/span><span style=\"font-weight: 400;\">\u00a0\u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430\u0448\u0443 \u041c\u043e\u0434\u0435\u043b\u044c \u0434\u043b\u044f\u00a0<code>SwiftUI<\/code> \u0432\u043d\u0435\u0448\u043d\u0438\u043c &#171;\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u0438\u0441\u0442\u0438\u043d\u044b&#187; (<code>source of truth<\/code>) .<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u041c\u043e\u0434\u0435\u043b\u044c \u0434\u043e\u043b\u0436\u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b <code><span style=\"color: #0000ff;\">ObservableObject<\/span><\/code> \u0438\u00a0\u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u043d\u0435\u043c &#171;\u043e\u0431\u0435\u0440\u0442\u043a\u0438&#187; \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u00a0<code><span style=\"color: #0000ff;\">@Published<\/span><\/code> \u0434\u043b\u044f \u0442\u0435\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u043e\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u044d\u0442\u043e\u00a0<code><span style=\"color: #0000ff;\">View<\/span><\/code>. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043a\u043b\u0430\u0441\u0441\u044b, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0435\u00a0<code><span style=\"color: #0000ff;\">ObservableObject<\/span><\/code> \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043e\u0442\u0434\u0435\u043b\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0442\u00a0<code><span style=\"color: #0000ff;\">View<\/span><\/code>\u00a0\u0432 <code>SwiftUI<\/code>. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438, <code><span style=\"color: #0000ff;\">ObservableObject<\/span><\/code>\u00a0\u043a\u043b\u0430\u0441\u0441 \u0431\u0435\u0440\u0435\u0442 \u043d\u0430 \u0441\u0435\u0431\u044f \u0440\u043e\u043b\u044c <code>View Model<\/code> \u0434\u043b\u044f \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u0438 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0438 \u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u043a <code><span style=\"color: #0000ff;\">View<\/span><\/code> \u0434\u0430\u043d\u043d\u044b\u0445. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a\u0430\u044f \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u0430\u00a0<code>View Model<\/code>\u00a0\u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 &#171;\u0433\u043e\u0442\u043e\u0432\u044b\u0445&#187; \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0439 \u0444\u0438\u043b\u044c\u043c\u043e\u0432: <code>nowPlaying<\/code> &#8212;\u00a0\u0438\u0434\u0443\u0449\u0438\u0445 \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432 \u043a\u0438\u043d\u043e\u0442\u0435\u0430\u0442\u0440\u0430\u0445,\u00a0<code>popular<\/code> &#8212;\u00a0\u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445,\u00a0<code>topRated<\/code> &#8212;\u00a0\u0442\u043e\u043f\u043e\u0432\u044b\u0445, <code>upcoming<\/code> &#8212;\u00a0\u0444\u0438\u043b\u044c\u043c\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043a\u043e\u0440\u043e \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435.<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-11-at-17.48.41.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11622 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-11-at-17.48.41.png\" alt=\"\" width=\"1406\" height=\"1392\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-11-at-17.48.41.png 1406w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-11-at-17.48.41-150x150.png 150w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-11-at-17.48.41-300x297.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-11-at-17.48.41-768x760.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-11-at-17.48.41-1024x1014.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-11-at-17.48.41-303x300.png 303w\" sizes=\"auto, (max-width: 1406px) 100vw, 1406px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a\u043e\u0439 <code><span style=\"color: #0000ff;\">Endpoint<\/span><\/code> \u0432\u044b\u0431\u0435\u0440\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c (<code><span style=\"color: #0000ff;\">.nowPlaying<\/span><\/code>, <code><span style=\"color: #0000ff;\">.popular<\/span><\/code>, <code><span style=\"color: #0000ff;\">.topRated <\/span><\/code> \u0438\u043b\u0438\u00a0<code><span style=\"color: #0000ff;\">.upcoming<\/span><\/code>),\u00a0\u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u0444\u0438\u043b\u044c\u043c\u043e\u0432 <code><span style=\"color: #0000ff;\">movies<\/span><\/code>, \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 <a href=\"https:\/\/developers.themoviedb.org\/3\/getting-started\/introduction\">\u00a0TMDb<\/a> :\u00a0\u00a0<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.13.04-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11798 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.13.04-1.png\" alt=\"\" width=\"1082\" height=\"868\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.13.04-1.png 1082w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.13.04-1-300x241.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.13.04-1-768x616.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.13.04-1-1024x821.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.13.04-1-374x300.png 374w\" sizes=\"auto, (max-width: 1082px) 100vw, 1082px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0412 \u044d\u0442\u043e\u043c \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435\u00a0<code><span style=\"color: #0000ff;\">MoviesViewModel<\/span><\/code>, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0435\u043c \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b <code><span style=\"color: #0000ff;\">ObservableObject<\/span><\/code>,\u00a0\u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0434\u0432\u0430 <code><span style=\"color: #0000ff;\">@Published<\/span><\/code> \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430: <\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\">\u043e\u0434\u043d\u043e\u00a0<code><span style=\"color: #0000ff;\">@Published var indexEndpoint: Int<\/span><\/code> &#8212; \u044d\u0442\u043e \u0438\u043d\u0434\u0435\u043a\u0441 <code><span style=\"color: #0000ff;\">Endpoint<\/span><\/code> (\u0443\u0441\u043b\u043e\u0432\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u0435\u0433\u043e &#171;\u0432\u0445\u043e\u0434\u043e\u043c&#187;, \u0442\u0430\u043a \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0430 <code><span style=\"color: #0000ff;\">View<\/span><\/code>),\u00a0<\/span><\/li>\n<li><span style=\"font-weight: 400;\">\u0434\u0440\u0443\u0433\u043e\u0435 <code><span style=\"color: #0000ff;\">@Published var movies: [Movie]<\/span><\/code>\u00a0&#8212; \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0444\u0438\u043b\u044c\u043c\u043e\u0432 (\u0443\u0441\u043b\u043e\u0432\u043d\u043e &#171;\u0432\u044b\u0445\u043e\u0434&#187;, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043f\u0443\u0442\u0435\u043c \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0431\u0430\u0437\u044b \u0444\u0438\u043b\u044c\u043c\u043e\u0432\u00a0<a href=\"https:\/\/developers.themoviedb.org\/3\/getting-started\/introduction\">TMDb<\/a>, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c\u044b\u0445 &#171;\u0432\u0445\u043e\u0434\u043e\u043c&#187;) \u0438 \u044d\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0432 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">\u0414\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u044d\u0442\u0438\u043c\u0438 \u0434\u0432\u0443\u043c\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438 (&#171;\u0432\u0445\u043e\u0434\u043e\u043c&#187; \u0438 &#171;\u0432\u044b\u0445\u043e\u0434\u043e\u043c&#187;) \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u043a\u043b\u0430\u0441\u0441\u0430 <code><span style=\"color: #0000ff;\">MoviesViewModel<\/span><\/code>\u00a0\u043f\u0440\u043e\u0442\u044f\u043d\u0443\u0442\u044c \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u043e\u0442 \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187;\u00a0<code><span style=\"color: #0000ff;\">$indexEndpoint<\/span><\/code>\u00a0\u0434\u043e \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187; <code><span style=\"color: #0000ff;\">AnyPublisher&lt;[Movie], Never&gt;<\/span><\/code>, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u043c\u044b &#171;\u043f\u043e\u0434\u043f\u0438\u0448\u0435\u043c\u0441\u044f&#187; \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <code><span style=\"color: #0000ff;\">assign\u00a0(to: \\.movies, on: self)<\/span><\/code> \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043c\u0430\u0441\u0441\u0438\u0432 \u0444\u0438\u043b\u044c\u043c\u043e\u0432\u00a0<code><span style=\"color: #0000ff;\">movies<\/span><\/code>.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 <code>Combine<\/code>\u00a0\u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442, \u0447\u0442\u043e \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u044b \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438\u00a0<code><span style=\"color: #0000ff;\">@Published<\/span><\/code>\u00a0\u043f\u0435\u0440\u0435\u0434 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e\u043c <code><span style=\"color: #0000ff;\">indexEndpoint<\/span><\/code>, \u0442\u043e \u043c\u044b\u00a0\u043c\u043e\u0436\u0435\u043c \u043d\u0430\u0447\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0438 \u043a\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e\u00a0<code><span style=\"color: #0000ff;\">indexEndpoint<\/span><\/code>, \u0438 \u043a\u0430\u043a \u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f <code><span style=\"color: #0000ff;\">$indexEndpoint<\/span><\/code>. \u0412\u0430\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0442\u044f\u043d\u0443\u0442\u044c \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u041d\u0415 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u00a0<code><span style=\"color: #0000ff;\">indexEndpoint<\/span><\/code>, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u0442\u00a0\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f <code><span style=\"color: #0000ff;\">$indexEndpoint<\/span><\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 <code>UI<\/code> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>SwiftUI<\/code> \u0438 \u0442\u0430\u043c \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code><span style=\"color: #0000ff;\">Picker<\/span><\/code> \u0438\u043b\u0438 <code><span style=\"color: #0000ff;\">Stepper<\/span><\/code>.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0412 \u043d\u0430\u0448\u0435\u043c \u043a\u043b\u0430\u0441\u0441\u0435\u00a0<code><span style=\"color: #0000ff;\">MovieAPI<\/span><\/code> \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code><span style=\"color: #0000ff;\">fetchMovies (from: Endpoint)<\/span><\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187;\u00a0<code><span style=\"color: #0000ff;\">AnyPublisher&lt;[Movie], Never&gt;<\/span><\/code>, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u00a0<code><span style=\"color: #0000ff;\">Endpoint<\/span><\/code>, \u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f <code><span style=\"color: #0000ff;\">$indexEndpoint<\/span><\/code> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.\u00a0 \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 <code>Combine<\/code>\u00a0\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442\u00a0\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u00a0<code><span style=\"color: #0000ff;\">flatMap<\/span><\/code>:<br \/>\n<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-18.19.45.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11774 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-18.19.45.png\" alt=\"\" width=\"992\" height=\"180\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-18.19.45.png 992w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-18.19.45-300x54.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-18.19.45-768x139.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-18.19.45-500x91.png 500w\" sizes=\"auto, (max-width: 992px) 100vw, 992px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <code><span style=\"color: #0000ff;\">flatMap<\/span><\/code> \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043d\u043e\u0432\u043e\u0433\u043e &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187; \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u043e\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187;.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0414\u0430\u043b\u0435\u0435 \u043c\u044b &#171;\u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u0441\u044f&#187; \u043d\u0430 \u044d\u0442\u043e\u0433\u043e \u0432\u043d\u043e\u0432\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187; \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e &#171;\u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u0430&#187;\u00a0<code><span style=\"color: #0000ff;\">assign (to: \\.movies, on: self)<\/span><\/code> \u0438 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u043e\u0442 &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187; \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u00a0<code><span style=\"color: #0000ff;\">@Published<\/span><\/code>\u00a0\u043c\u0430\u0441\u0441\u0438\u0432\u0443\u00a0<code><span style=\"color: #0000ff;\">movies<\/span><\/code>:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.18.16.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11776 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.18.16.png\" alt=\"\" width=\"992\" height=\"242\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.18.16.png 992w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.18.16-300x73.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.18.16-768x187.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.18.16-500x122.png 500w\" sizes=\"auto, (max-width: 992px) 100vw, 992px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u041c\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0432 <code><span style=\"color: #0000ff;\">init( )<\/span><\/code> \u0410\u0421\u0418\u041d\u0425\u0420\u041e\u041d\u041d\u041e\u0413\u041e &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187; \u0438 &#171;\u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043b\u0438\u0441\u044c&#187; \u043d\u0430 \u043d\u0435\u0433\u043e, \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0432 <code><span style=\"color: #0000ff;\">AnyCancellable<\/span><\/code> &#171;\u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443&#187; \u0438 \u044d\u0442\u043e \u043b\u0435\u0433\u043a\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0435\u0441\u043b\u0438 \u043c\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u043d\u0430\u0448\u0443 &#171;\u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443&#187; \u0432 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0435<code><span style=\"color: #0000ff;\"> let subscription<\/span><\/code>:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Subscription.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11724 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Subscription.png\" alt=\"\" width=\"1068\" height=\"640\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Subscription.png 1068w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Subscription-300x180.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Subscription-768x460.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Subscription-1024x614.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Subscription-500x300.png 500w\" sizes=\"auto, (max-width: 1068px) 100vw, 1068px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\"> <code><span style=\"color: #0000ff;\">AnyCancellable <\/span><\/code> &#171;\u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430&#187; \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0432 \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c &#171;\u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443&#187; \u0438 \u0434\u0430\u043b\u0435\u0435 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043e\u0442 &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187;, \u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e\u00a0<code><span style=\"color: #0000ff;\">AnyCancellable<\/span><\/code> &#171;\u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430&#187; (\u0430 \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430 <code><span style=\"color: #0000ff;\">subscription<\/span><\/code>) \u043f\u043e\u043a\u0438\u0434\u0430\u0435\u0442 \u0441\u0432\u043e\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u043f\u0430\u043c\u044f\u0442\u044c, \u0437\u0430\u043d\u044f\u0442\u0430\u044f &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u0435\u043c&#187; \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u0435\u0442\u0441\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e <code><span style=\"color: #0000ff;\">init( )<\/span><\/code> \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044f, \u044d\u0442\u0430 &#171;\u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430&#187; \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u0430 <code>ARC<\/code>,\u00a0\u0442\u0430\u043a \u0438 \u043d\u0435 \u0443\u0441\u043f\u0435\u0432 \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u0441 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043c\u0430\u0441\u0441\u0438\u0432\u0443\u00a0<code><span style=\"color: #0000ff;\">movies<\/span><\/code>. \u0414\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0442\u0430\u043a\u043e\u0439 &#171;\u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438&#187; \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0417\u0410 \u041f\u0420\u0415\u0414\u0415\u041b\u0410\u041c\u0418\u00a0<code><span style=\"color: #0000ff;\">init()<\/span><\/code>\u00a0\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code><span style=\"color: #0000ff;\"> var\u00a0cancellableSet<\/span><\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442 \u043d\u0430\u0448\u0443\u00a0<code><span style=\"color: #0000ff;\">AnyCancellable<\/span><\/code> &#171;\u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443&#187; \u0432 \u044d\u0442\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0438 \u0432\u0441\u0435\u0433\u043e \u201c\u0436\u0438\u0437\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430\u201d \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u043a\u043b\u0430\u0441\u0441\u0430\u00a0<code><span style=\"color: #0000ff;\">MoviesViewMode<\/span><\/code>. \u041e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u0430 \u0438\u0437 \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u0440\u0438\u00a0<code><span style=\"color: #0000ff;\">deinit<\/span><\/code> \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u043a\u043b\u0430\u0441\u0441\u0430 <code>View Model<\/code>:\u00a0<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.21.12.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11777 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.21.12.png\" alt=\"\" width=\"984\" height=\"218\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.21.12.png 984w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.21.12-300x66.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.21.12-768x170.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.21.12-500x111.png 500w\" sizes=\"auto, (max-width: 984px) 100vw, 984px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0417\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442\u0441\u044f <code><span style=\"color: #0000ff;\">AnyCancellable<\/span><\/code> &#171;\u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430&#187; \u0432\u00a0\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439\u00a0<code><span style=\"color: #0000ff;\">cancellableSet<\/span><\/code> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u00a0<code><span style=\"color: #0000ff;\">store ( in: &amp;self.cancellableSet)<\/span><\/code>:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.24.22.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11778 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.24.22.png\" alt=\"\" width=\"1032\" height=\"266\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.24.22.png 1032w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.24.22-300x77.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.24.22-768x198.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.24.22-1024x264.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.24.22-500x129.png 500w\" sizes=\"auto, (max-width: 1032px) 100vw, 1032px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\"> \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435\u00a0&#171;\u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430&#187; \u043d\u0430 \u0410\u0421\u0418\u041d\u0425\u0420\u041e\u041d\u041d\u041e\u0413\u041e &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187;, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0432 <code><span style=\"color: #0000ff;\">init( )<\/span><\/code>, \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c\u0441\u044f \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0433\u043e \u201c\u0436\u0438\u0437\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430\u201d \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u043a\u043b\u0430\u0441\u0441\u0430\u00a0<code><span style=\"color: #0000ff;\">MoviesViewModel<\/span><\/code>. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u043a\u0430\u043a \u0443\u0433\u043e\u0434\u043d\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f <code><span style=\"color: #0000ff;\">$indexEndpoint<\/span><\/code>, \u0438\u00a0\u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 &#171;\u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0435&#187; \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0444\u0438\u043b\u044c\u043c\u043e\u0432 <code><span style=\"color: #0000ff;\">movies<\/span><\/code> \u0431\u0435\u0437 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u0438\u043b\u0438\u0439. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c <code>View Model<\/code> \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u0444\u0438\u043b\u044c\u043c\u043e\u0432, \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e <code>UI<\/code>.\u00a0\u0412 <code>SwiftUI<\/code> \u0434\u043b\u044f \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438 <code><span style=\"color: #0000ff;\">View<\/span><\/code> c <code><span style=\"color: #0000ff;\">ObservableObject<\/span><\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <code><span style=\"color: #0000ff;\">@ObservedObject<\/span><\/code> \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443\u00a0<code><span style=\"color: #0000ff;\">ContentView<\/span><\/code>\u00a0\u043d\u0430\u0448\u0443\u00a0<code>View Model<\/code> \u043a\u0430\u043a\u00a0<code><span style=\"color: #0000ff;\">@ObservedObject<\/span><\/code> \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code><span style=\"color: #0000ff;\"> var moviesViewModel<\/span><\/code> \u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u043c <code><span style=\"color: #0000ff;\">Text (\"Hello, World!\")<\/span><\/code> \u043d\u0430 \u0441\u043f\u0438\u0441\u043e\u043a \u0444\u0438\u043b\u044c\u043c\u043e\u0432 <code><span style=\"color: #0000ff;\">List<\/span><\/code>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u043c \u0444\u0438\u043b\u044c\u043c\u044b <code><span style=\"color: #0000ff;\">moviesViewModel.movies<\/span><\/code>, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435\u00a0 \u0438\u0437 \u043d\u0430\u0448\u0435\u0439\u00a0<code>View Model<\/code>:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-10.08.21.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11790 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-10.08.21.png\" alt=\"\" width=\"982\" height=\"564\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-10.08.21.png 982w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-10.08.21-300x172.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-10.08.21-768x441.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-10.08.21-500x287.png 500w\" sizes=\"auto, (max-width: 982px) 100vw, 982px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0422\u0435\u043f\u0435\u0440\u044c, \u043b\u044e\u0431\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u00a0<code><span style=\"color: #0000ff;\">@Published<\/span><\/code>\u00a0\u0441\u0432\u043e\u0439\u0441\u0442\u0432, \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0432 \u043d\u0430\u0448\u0435\u0439\u00a0<code><span style=\"color: #0000ff;\">ObservableObject<\/span><\/code>\u00a0\u041c\u043e\u0434\u0435\u043b\u0438 \u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0432\u00a0<code><span style=\"color: #0000ff;\">View<\/span><\/code>\u00a0\u0432 \u0432\u0438\u0434\u0435\u00a0<code><span style=\"color: #0000ff;\">@ObservedObject<\/span><\/code> \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043a &#171;\u043f\u0435\u0440\u0435\u0440\u0438\u0441\u043e\u0432\u043a\u0435&#187; <code><span style=\"color: #0000ff;\">View<\/span><\/code>. \u0410 \u044d\u0442\u043e \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b\u00a0<code>MVVM<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b\u043b\u0430 \u0437\u0430\u044f\u0432\u043b\u0435\u043d\u0430 \u0434\u043b\u044f\u00a0<code>SwiftUI<\/code> \u043a\u0430\u043a \u043f\u0440\u0435\u0435\u043c\u043d\u0438\u043a <code>MVC<\/code>.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0444\u0438\u043b\u044c\u043c\u043e\u0432 \u0434\u043b\u044f \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u00a0<code><span style=\"color: #0000ff;\">indexEndpoint = 2<\/span><\/code>, \u0442\u043e \u0435\u0441\u0442\u044c <code><span style=\"color: #0000ff;\">.upcoming<\/span><\/code>\u00a0:<br \/>\n<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-11-at-21.04.47.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11628 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-11-at-21.04.47.png\" alt=\"\" width=\"1004\" height=\"1398\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-11-at-21.04.47.png 1004w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-11-at-21.04.47-215x300.png 215w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-11-at-21.04.47-768x1069.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-11-at-21.04.47-735x1024.png 735w\" sizes=\"auto, (max-width: 1004px) 100vw, 1004px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u0430 \u043d\u0430\u0448 \u044d\u043a\u0440\u0430\u043d\u00a0<code>UI<\/code> \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0435\u043c, \u043a\u0430\u043a\u0443\u044e \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e \u0444\u0438\u043b\u044c\u043c\u043e\u0432 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0443\u0442\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u00a0<code><span style=\"color: #0000ff;\">indexEndpoint<\/span><\/code>. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0434\u043e\u0439\u0442\u0438\u00a0<code><span style=\"color: #0000ff;\">Stepper<\/span><\/code>\u00a0\u0438\u043b\u0438 <code><span style=\"color: #0000ff;\"> Picker<\/span><\/code>. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u00a0<code><span style=\"color: #0000ff;\">Picker<\/span><\/code>. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u00a0<code><span style=\"color: #0000ff;\">Picker<\/span><\/code>, \u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c &#171;\u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e&#187; &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187;\u00a0<code><span style=\"color: #0000ff;\">$moviesViewModel.indexEndpoint<\/span><\/code>:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-10.17.01.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11791 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-10.17.01.png\" alt=\"\" width=\"1022\" height=\"830\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-10.17.01.png 1022w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-10.17.01-300x244.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-10.17.01-768x624.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-10.17.01-369x300.png 369w\" sizes=\"auto, (max-width: 1022px) 100vw, 1022px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">&#8230; \u0430 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043f\u0438\u0441\u043a\u0430 <code><span style=\"color: #0000ff;\">List<\/span><\/code>, \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0433\u043e \u043d\u0430\u0448\u0438\u043c &#171;\u0432\u044b\u0445\u043e\u0434\u043d\u044b\u043c&#187; \u0438\u0437\u0434\u0430\u0442\u0435\u043b\u0435\u043c\u00a0<code><span style=\"color: #0000ff;\">moviesViewModel.movies<\/span><\/code>, \u0431\u0443\u0434\u0435\u0442 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0430\u044f \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f \u0444\u0438\u043b\u044c\u043c\u043e\u0432:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-12-at-15.48.30.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11634 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-12-at-15.48.30.png\" alt=\"\" width=\"1402\" height=\"1404\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-12-at-15.48.30.png 1402w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-12-at-15.48.30-150x150.png 150w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-12-at-15.48.30-300x300.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-12-at-15.48.30-768x769.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-12-at-15.48.30-1024x1024.png 1024w\" sizes=\"auto, (max-width: 1402px) 100vw, 1402px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u041d\u0438\u043a\u0430\u043a\u043e\u0439 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u0435\u0436\u0434\u0443 <code><span style=\"color: #0000ff;\">View<\/span><\/code> \u0438 <code>View Model<\/code> \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f. <code>SwiftUI<\/code> \u0410\u0412\u0422\u041e\u041c\u0410\u0422\u0418\u0427\u0415\u0421\u041a\u0418 &#171;\u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f&#187; \u043d\u0430\u00a0<code><span style=\"color: #0000ff;\">ObservableObject<\/span><\/code>\u00a0\u0438 \u0435\u0433\u043e <code><span style=\"color: #0000ff;\">@Published<\/span><\/code> \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c\u0438 \u0437\u0430 \u0442\u043e, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435.\u00a0\u00a0<\/span><\/p>\n<h1>SwiftUI \u0438 View Model. \u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043a\u0438\u043d\u043e\u043f\u0441\u0442\u0435\u0440\u043e\u0432 \u0438 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0439 \u0430\u043a\u0442\u0435\u0440\u043e\u0432.<\/h1>\n<p><span style=\"font-weight: 400;\">\u041c\u043e\u0434\u0435\u043b\u044c <code><span style=\"color: #0000ff;\">Movie<\/span><\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043c\u0435\u0441\u0442\u043e\u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u043a\u0438\u043d\u043e\u043f\u043e\u0441\u0442\u0435\u0440\u0430 <code><span style=\"color: #0000ff;\">posterPath:<\/span><\/code><\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-13.52.24.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11688 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-13.52.24.png\" alt=\"\" width=\"946\" height=\"272\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-13.52.24.png 946w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-13.52.24-300x86.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-13.52.24-768x221.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-13.52.24-500x144.png 500w\" sizes=\"auto, (max-width: 946px) 100vw, 946px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">&#8230;,\u00a0 \u0430 \u041c\u043e\u0434\u0435\u043b\u044c \u0430\u043a\u0442\u0435\u0440\u0430\u00a0<code><span style=\"color: #0000ff;\">MovieCast<\/span><\/code>\u00a0\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043c\u0435\u0441\u0442\u043e\u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u043f\u043e\u0440\u0442\u0440\u0435\u0442\u0430 \u0430\u043a\u0442\u0435\u0440\u0430\u00a0<code><span style=\"color: #0000ff;\">profilePath<\/span><\/code>:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-13-at-12.52.37.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11640 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-13-at-12.52.37.png\" alt=\"\" width=\"878\" height=\"280\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-13-at-12.52.37.png 878w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-13-at-12.52.37-300x96.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-13-at-12.52.37-768x245.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-13-at-12.52.37-500x159.png 500w\" sizes=\"auto, (max-width: 878px) 100vw, 878px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0412 \u043b\u044e\u0431\u043e\u043c \u0438\u0437 \u044d\u0442\u0438\u0445 \u0434\u0432\u0443\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <code><span style=\"color: #0000ff;\">UIImage<\/span><\/code> \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445\u00a0<a href=\"https:\/\/developers.themoviedb.org\/3\/getting-started\/introduction\">TMDb<\/a>. \u041c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432\u00a0<a href=\"https:\/\/developers.themoviedb.org\/3\/getting-started\/introduction\">TMDb<\/a>\u00a0\u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u00a0<code><span style=\"color: #0000ff;\">Size<\/span><\/code>:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.39.30.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11779 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.39.30.png\" alt=\"\" width=\"1062\" height=\"656\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.39.30.png 1062w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.39.30-300x185.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.39.30-768x474.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.39.30-1024x633.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.39.30-486x300.png 486w\" sizes=\"auto, (max-width: 1062px) 100vw, 1062px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0423\u043a\u0430\u0437\u0430\u0432 \u0440\u0430\u0437\u043c\u0435\u0440 <code><span style=\"color: #0000ff;\">Size<\/span><\/code> \u0438 \u0434\u0430\u043d\u043d\u044b\u0435\u00a0<code><span style=\"color: #0000ff;\">poster<\/span><\/code> \u043e \u043a\u0438\u043d\u043e\u043f\u043e\u0441\u0442\u0435\u0440\u0435 \u0444\u0438\u043b\u044c\u043c\u0430 \u0438\u043b\u0438 \u043f\u043e\u0440\u0442\u0440\u0435\u0442\u0435 \u0430\u043a\u0442\u0435\u0440\u0430, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u00a0<code>URL<\/code>\u00a0\u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 <code><span style=\"color: #0000ff;\">path ( poster: String) -&gt; URL?<\/span><\/code>. \u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u044d\u0442\u043e\u0433\u043e\u00a0<code>URL<\/code> \u043c\u044b \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0430\u043c\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f <span style=\"color: #0000ff;\">UIImage<\/span>\u00a0\u0438\u0437 \u0431\u0430\u0437\u044b \u0444\u0438\u043b\u044c\u043c\u043e\u0432\u00a0<a href=\"https:\/\/developers.themoviedb.org\/3\/getting-started\/introduction\">TMDb<\/a>.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u041d\u0430\u043c \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u0430 \u044d\u0442\u0430 \u0437\u0430\u0434\u0430\u0447\u0430. \u0412 \u043a\u043b\u0430\u0441\u0441\u0435\u00a0<code><span style=\"color: #0000ff;\">ImageLoader<\/span><\/code>\u00a0\u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187;\u00a0<code><span style=\"color: #0000ff;\"> AnyPublisher&lt;UIImage?, Never&gt;<\/span><\/code> \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u00a0<code><span style=\"color: #0000ff;\">UIImage?<\/span><\/code>\u00a0\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0438\u00a0<code><span style=\"color: #0000ff;\">Never<\/span><\/code> (\u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0435\u0441\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442, \u0442\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f <code><span style=\"color: #0000ff;\">nil<\/span><\/code>). \u041a \u044d\u0442\u043e\u043c\u0443 &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044e&#187; \u043c\u043e\u0436\u043d\u043e &#171;\u043f\u043e\u0434\u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f&#187; \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u00a0<code><span style=\"color: #0000ff;\">UIImage?<\/span><\/code>\u00a0\u043f\u0440\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 (<code>UI<\/code>). \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u0442\u0430\u043a\u043e\u0433\u043e &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187; \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f\u00a0<code><span style=\"color: #0000ff;\">url<\/span><\/code>:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.43.18.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11780 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.43.18.png\" alt=\"\" width=\"966\" height=\"418\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.43.18.png 966w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.43.18-300x130.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.43.18-768x332.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.43.18-500x216.png 500w\" sizes=\"auto, (max-width: 966px) 100vw, 966px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e, \u043a\u0430\u043a \u0438\u0434\u0435\u0442 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>Combine<\/code> &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187; <code><span style=\"color: #0000ff;\">AnyPublisher &lt;UIImage?, Never&gt;<\/span><\/code>, \u0435\u0441\u043b\u0438 \u043d\u0430\u043c \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d <code><span style=\"color: #0000ff;\">url<\/span><\/code>:<\/span><\/p>\n<ol>\n<li><span style=\"font-weight: 400;\">\u0435\u0441\u043b\u0438 <code><span style=\"color: #0000ff;\">url<\/span><\/code> \u0440\u0430\u0432\u0435\u043d <code><span style=\"color: #0000ff;\">nil<\/span><\/code>, \u0442\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c <code><span style=\"color: #0000ff;\">Just(nil)<\/span><\/code>,<\/span><\/li>\n<li><span style=\"font-weight: 400;\">\u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 <code><span style=\"color: #0000ff;\">url<\/span><\/code> \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187; <code><span style=\"color: #0000ff;\">dataTaskPublisher(for:)<\/span><\/code>, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <code><span style=\"color: #0000ff;\">Output<\/span><\/code> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u0440\u0442\u0435\u0436 <code><span style=\"color: #0000ff;\">(data: Data, response: URLResponse)<\/span><\/code> \u0438 \u043e\u0448\u0438\u0431\u043a\u043e\u0439\u00a0<code><span style=\"color: #0000ff;\">Failure<\/span><\/code> &#8212;\u00a0<code><span style=\"color: #0000ff;\">URLError<\/span><\/code>,<br \/>\n<\/span><\/li>\n<li><span style=\"font-weight: 400;\">\u0431\u0435\u0440\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code><span style=\"color: #0000ff;\">map {}<\/span><\/code> \u0438\u0437 \u043a\u043e\u0440\u0442\u0435\u0436\u0430 <code><span style=\"color: #0000ff;\">(data: Data, response: URLResponse)<\/span><\/code> \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0430\u043d\u043d\u044b\u0435\u00a0<code><span style=\"color: #0000ff;\">data<\/span><\/code>, \u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c <code><span style=\"color: #0000ff;\">UIImage<\/span><\/code>,<\/span><\/li>\n<li><span style=\"font-weight: 400;\">\u043f\u0440\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0448\u0430\u0433\u0430\u0445 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c <code><span style=\"color: #0000ff;\">nil<\/span><\/code>,<\/span><\/li>\n<li><span style=\"font-weight: 400;\">\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430 <code>main<\/code> \u043f\u043e\u0442\u043e\u043a, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 <code>UI<\/code><\/span><\/li>\n<li><span style=\"font-weight: 400;\">&#171;\u0441\u0442\u0438\u0440\u0430\u0435\u043c&#187; \u0422\u0418\u041f &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187; \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 <code><span style=\"color: #0000ff;\">AnyPublisher<\/span><\/code>.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">\u0412\u044b \u0432\u0438\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u043a\u043e\u0434 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u044b\u0439 \u0438 \u0445\u043e\u0440\u043e\u0448\u043e \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0439, \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 <code>callbacks<\/code>.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e\u00a0<code>View Model<\/code>\u00a0\u0434\u043b\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f <code><span style=\"color: #0000ff;\">UIImage?<\/span><\/code>. \u042d\u0442\u043e \u043a\u043b\u0430\u0441\u0441 <code><span style=\"color: #0000ff;\">ImageLoader<\/span><\/code>,\u00a0\u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b <code><span style=\"color: #0000ff;\">ObservableObject<\/span><\/code>,\u00a0\u0441 \u0434\u0432\u0443\u043c\u044f\u00a0<code><span style=\"color: #0000ff;\">@Published<\/span><\/code> \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438:<br \/>\n\u043e\u0434\u043d\u043e\u00a0 \u00a0 &#8212; <code><span style=\"color: #0000ff;\"> @Published url: URL?<\/span><\/code>\u00a0&#8212; \u044d\u0442\u043e <code>URL<\/code> \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f,<br \/>\n\u0434\u0440\u0443\u0433\u043e\u0435 &#8212;\u00a0<code><span style=\"color: #0000ff;\">@Published var image: UIImage?<\/span><\/code>\u00a0&#8212; \u044d\u0442\u043e \u0441\u0430\u043c\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0438\u0437 \u0431\u0430\u0437\u044b <a href=\"https:\/\/developers.themoviedb.org\/3\/getting-started\/introduction\">TMDb<\/a>:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.45.51.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11781 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.45.51.png\" alt=\"\" width=\"958\" height=\"330\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.45.51.png 958w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.45.51-300x103.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.45.51-768x265.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.45.51-500x172.png 500w\" sizes=\"auto, (max-width: 958px) 100vw, 958px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0418 \u043e\u043f\u044f\u0442\u044c \u043f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u043a\u043b\u0430\u0441\u0441\u0430\u00a0<code><span style=\"color: #0000ff;\">ImageLoader<\/span><\/code>\u00a0\u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u043e\u0442\u044f\u043d\u0443\u0442\u044c \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u043e\u0442 \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187;\u00a0<code><span style=\"color: #0000ff;\">$url<\/span><\/code>\u00a0\u0434\u043e \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187;\u00a0<code><span style=\"color: #0000ff;\">AnyPublisher&lt;UIImage?, Never&gt;<\/span><\/code>, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u043c\u044b\u00a0 &#171;\u043f\u043e\u0434\u043f\u0438\u0448\u0435\u043c\u0441\u044f&#187; \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043d\u0443\u0436\u043d\u043e\u0435 \u043d\u0430\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <code><span style=\"color: #0000ff;\">image<\/span><\/code>.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u00a0\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u00a0<code><span style=\"color: #0000ff;\">flatMap<\/span><\/code>\u00a0\u0438\u00a0\u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e &#171;\u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u0430&#187;\u00a0<code><span style=\"color: #0000ff;\">assign (to: \\image, on: self)<\/span><\/code> \u0441 \u0446\u0435\u043b\u044c\u044e \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u0442 &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187; \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0443 <code><span style=\"color: #0000ff;\">@Published image<\/span><\/code>:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.47.47.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11782 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.47.47.png\" alt=\"\" width=\"986\" height=\"298\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.47.47.png 986w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.47.47-300x91.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.47.47-768x232.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-20.47.47-500x151.png 500w\" sizes=\"auto, (max-width: 986px) 100vw, 986px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0418 \u043e\u043f\u044f\u0442\u044c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439\u00a0<code><span style=\"color: #0000ff;\">cancellableSet<\/span><\/code> \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442\u0441\u044f <code><span style=\"color: #0000ff;\">AnyCancellable<\/span><\/code> &#171;\u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430&#187; \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u00a0<code><span style=\"color: #0000ff;\">store(in: &amp;self.cancellableSet)<\/span><\/code>.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c <code>View Model<\/code> \u0434\u043b\u044f\u00a0\u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u00a0<code><span style=\"color: #0000ff;\">UIImage?<\/span><\/code> \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u00a0<a href=\"https:\/\/developers.themoviedb.org\/3\/getting-started\/introduction\">TMDb<\/a>, \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e <code>UI<\/code>\u00a0\u0434\u043b\u044f \u0435\u0433\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 <code><span style=\"color: #0000ff;\">MoviePosterImage<\/span><\/code>\u00a0\u043d\u0430\u0448\u0443\u00a0<code>View Model<\/code> \u043a\u0430\u043a\u00a0<code><span style=\"color: #0000ff;\">@ObservedObject<\/span><\/code> \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code><span style=\"color: #0000ff;\"> var imageLoader: ImageLoader<\/span><\/code>\u00a0\u0438 \u043e\u0431\u044b\u0447\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e\u00a0<code><span style=\"color: #0000ff;\">var posterSize: PosterStyle.Size:<\/span><\/code><\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-21.05.52.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11783 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-21.05.52.png\" alt=\"\" width=\"1112\" height=\"762\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-21.05.52.png 1112w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-21.05.52-300x206.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-21.05.52-768x526.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-21.05.52-1024x702.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-21.05.52-438x300.png 438w\" sizes=\"auto, (max-width: 1112px) 100vw, 1112px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u041f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430\u0448\u0435\u0439 <code>View Model<\/code> <code><span style=\"color: #0000ff;\">imageLoader<\/span><\/code> \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <code><span style=\"color: #0000ff;\">image<\/span><\/code> \u0440\u0430\u0432\u043d\u043e <code><span style=\"color: #0000ff;\">nil<\/span><\/code> \u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u0435\u0440\u044b\u0439 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a <code><span style=\"color: #0000ff;\">Rectangle()<\/span><\/code> \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0441\u044f \u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e\u00a0<code><span style=\"color: #0000ff;\">@Published image<\/span><\/code>\u00a0\u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f, \u0447\u0442\u043e, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0432\u044b\u0437\u043e\u0432\u0435\u0442 &#171;\u043f\u0435\u0440\u0435\u0440\u0438\u0441\u043e\u0432\u043a\u0443&#187; <code><span style=\"color: #0000ff;\">MoviePosterImage<\/span><\/code>, \u0438 \u043c\u044b\u00a0\u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <code><span style=\"color: #0000ff;\">Image (uiImage: self.imageLoader.image!)<\/span><\/code>:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-13-at-15.17.57.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11644 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-13-at-15.17.57.png\" alt=\"\" width=\"1650\" height=\"1406\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-13-at-15.17.57.png 1650w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-13-at-15.17.57-300x256.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-13-at-15.17.57-768x654.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-13-at-15.17.57-1024x873.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-13-at-15.17.57-352x300.png 352w\" sizes=\"auto, (max-width: 1650px) 100vw, 1650px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u042d\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442 \u0410\u0412\u0422\u041e\u041c\u0410\u0422\u0418\u0427\u0415\u0421\u041a\u0418.\u00a0 \u041d\u0430\u043c \u043d\u0438\u0447\u0435\u0433\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u043d\u0430\u0434\u043e \u0434\u0435\u043b\u0430\u0442\u044c.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u041e\u0434\u043d\u0430\u043a\u043e, \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <code><span style=\"color: #0000ff;\">image<\/span><\/code> \u0440\u0430\u0432\u043d\u043e\u0435\u00a0<code><span style=\"color: #0000ff;\">nil<\/span><\/code>\u00a0\u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <code><span style=\"color: #0000ff;\">UIImage<\/span><\/code>. \u0415\u0441\u043b\u0438 <code><span style=\"color: #0000ff;\">url<\/span><\/code> \u043f\u043e \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u0440\u0430\u0432\u0435\u043d <code><span style=\"color: #0000ff;\">nil<\/span><\/code>, \u0442\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <code><span style=\"color: #0000ff;\">image<\/span><\/code>\u00a0\u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0438 \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u043f\u0443\u0441\u0442\u044b\u043c. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043f\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e\u00a0<code><span style=\"color: #0000ff;\">url<\/span><\/code>\u00a0\u043c\u044b \u0441 \u0441\u0430\u043c\u043e\u0433\u043e \u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u043e\u0436\u0435\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043b\u0438 \u043e\u0436\u0438\u0434\u0430\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u043d\u0435\u0442. \u041c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u044d\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0435\u0441\u043b\u0438\u00a0\u00a0<code><span style=\"color: #0000ff;\">url<\/span><\/code>\u00a0\u043d\u0435 \u0440\u0430\u0432\u0435\u043d <code><span style=\"color: #0000ff;\">nil<\/span><\/code>, \u0430 \u0441\u0430\u043c\u043e\u00a0\u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <code><span style=\"color: #0000ff;\">image<\/span><\/code> \u0440\u0430\u0432\u043d\u043e\u0435\u00a0<code><span style=\"color: #0000ff;\">nil<\/span><\/code>, \u0442\u043e \u043f\u043e\u0432\u0435\u0440\u0445 \u0441\u0435\u0440\u043e\u0433\u043e \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430\u00a0 \u043c\u044b \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0430\u043d\u0438\u043c\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 &#171;Loading &#8230;&#187;, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 &#171;\u0437\u0430\u043c\u0435\u0441\u0442\u0438\u0442\u0435\u043b\u0435\u043c&#187; (<strong>placeholder<\/strong>)\u00a0 \u0434\u043b\u044f \u0432\u043e\u0442-\u0432\u043e\u0442 \u0433\u043e\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u044f\u0432\u0438\u0442\u044c\u0441\u044f \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u00a0<code><span style=\"color: #0000ff;\">UIImage<\/span><\/code>:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-25-at-21.51.44.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11734 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-25-at-21.51.44.png\" alt=\"\" width=\"1204\" height=\"1170\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-25-at-21.51.44.png 1204w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-25-at-21.51.44-300x292.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-25-at-21.51.44-768x746.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-25-at-21.51.44-1024x995.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-25-at-21.51.44-309x300.png 309w\" sizes=\"auto, (max-width: 1204px) 100vw, 1204px\" \/><\/a><\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u0443 \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u043f\u043e\u0441\u0442\u0435\u0440\u043e\u0432 \u0444\u0438\u043b\u044c\u043c\u043e\u0432 &#8230;<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-25-at-22.06.00.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11736 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-25-at-22.06.00.png\" alt=\"\" width=\"1434\" height=\"1402\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-25-at-22.06.00.png 1434w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-25-at-22.06.00-300x293.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-25-at-22.06.00-768x751.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-25-at-22.06.00-1024x1001.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-25-at-22.06.00-307x300.png 307w\" sizes=\"auto, (max-width: 1434px) 100vw, 1434px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">&#8230; \u0438\u043b\u0438 \u043f\u043e\u0440\u0442\u0440\u0435\u0442\u043e\u0432 \u0430\u0440\u0442\u0438\u0441\u0442\u043e\u0432:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-25-at-22.13.44.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11737 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-25-at-22.13.44.png\" alt=\"\" width=\"1390\" height=\"1374\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-25-at-22.13.44.png 1390w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-25-at-22.13.44-300x297.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-25-at-22.13.44-768x759.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-25-at-22.13.44-1024x1012.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-25-at-22.13.44-303x300.png 303w\" sizes=\"auto, (max-width: 1390px) 100vw, 1390px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0427\u0442\u043e\u0431\u044b \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043d\u0435 \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445\u00a0<a href=\"https:\/\/developers.themoviedb.org\/3\/getting-started\/introduction\">TMDb<\/a>, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u044b\u043c \u043a\u044d\u0448\u0435\u043c\u00a0<code><span style=\"color: #0000ff;\">NSCache &lt;NSString, ImageLoader&gt;<\/span><\/code> \u0434\u043b\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432 \u043a\u043b\u0430\u0441\u0441\u0430\u00a0<code><span style=\"color: #0000ff;\">ImageLoader<\/span><\/code>,\u00a0 \u0430 \u0442\u0430\u043a\u0436\u0435\u00a0\u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430 \u0438\u0445 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f:\u00a0<\/span><br \/>\n<span style=\"font-weight: 400;\">\u043e\u0434\u0438\u043d \u0434\u043b\u044f\u00a0\u043a\u0438\u043d\u043e\u043f\u043e\u0441\u0442\u0435\u0440\u0430 \u0444\u0438\u043b\u044c\u043c\u0430\u00a0<code><span style=\"color: #0000ff;\">movie\u00a0<\/span><\/code> &#8212;\u00a0<code><span style=\"color: #0000ff;\">func loaderFor (movie: Movie&lt;)\u00a0-&gt; ImageLoader<\/span><\/code>,<br \/>\n\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 &#8212; \u0434\u043b\u044f \u043f\u043e\u0440\u0442\u0440\u0435\u0442\u0430 \u0430\u043a\u0442\u0435\u0440\u0430\u00a0<code><span style=\"color: #0000ff;\">cast\u00a0<\/span><\/code> &#8212;\u00a0<code><span style=\"color: #0000ff;\">func loaderFor (cast: MovieCast&lt;)\u00a0-&gt; ImageLoader<\/span><\/code>.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u041a\u043b\u044e\u0447\u0430\u043c\u0438 \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437\/\u0432 \u043a\u044d\u0448\u0430 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 \u0444\u0438\u043b\u044c\u043c\u043e\u0432 <code><span style=\"color: #0000ff;\">movie.id <\/span><\/code> \u0438 \u0430\u043a\u0442\u0435\u0440\u043e\u0432 <code><span style=\"color: #0000ff;\">cast.id<\/span><\/code>:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-13-at-20.05.13.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11648 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-13-at-20.05.13.png\" alt=\"\" width=\"1040\" height=\"1144\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-13-at-20.05.13.png 1040w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-13-at-20.05.13-273x300.png 273w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-13-at-20.05.13-768x845.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-13-at-20.05.13-931x1024.png 931w\" sizes=\"auto, (max-width: 1040px) 100vw, 1040px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0415\u0441\u043b\u0438 \u0432\u00a0\u043a\u044d\u0448\u0435 <code><span style=\"color: #0000ff;\">loaders<\/span><\/code>\u00a0\u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043d\u0435 \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0442\u043e c \u043f\u043e\u043c\u043e\u0449\u044c\u044e\u00a0<code><span style=\"color: #0000ff;\">ImageAPI.Size<\/span><\/code>\u00a0\u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f <code>URL<\/code>\u00a0\u0438 \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u043b\u0430\u0441\u0441\u0430\u00a0<code><span style=\"color: #0000ff;\">ImageLoader<\/span><\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u00a0\u043a\u044d\u0448\u00a0<code><span style=\"color: #0000ff;\">loaders<\/span><\/code>\u00a0\u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u0421\u0430\u043c\u0430 <code>View Model<\/code> \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0432 \u0432\u0438\u0434\u0435 \u043a\u043b\u0430\u0441\u0441\u0430\u00a0<code><span style=\"color: #0000ff;\">ImageLoader<\/span><\/code> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043b\u044e\u0431\u043e\u043c \u0434\u0440\u0443\u0433\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438.<\/span><\/p>\n<h1>\u0421\u043f\u0438\u0441\u043e\u043a \u0444\u0438\u043b\u044c\u043c\u043e\u0432 \u0441 \u043a\u0438\u043d\u043e\u043f\u043e\u0441\u0442\u0435\u0440\u0430\u043c\u0438 \u0438 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e\u0431 \u0430\u043a\u0442\u0435\u0440\u0441\u043a\u043e\u043c \u0441\u043e\u0441\u0442\u0430\u0432\u0435.<\/h1>\n<p><span style=\"font-weight: 400;\">\u0412\u0435\u0440\u043d\u0435\u043c \u043a \u0441\u043f\u0438\u0441\u043a\u0443 \u0444\u0438\u043b\u044c\u043c\u043e\u0432 \u0432 <code><span style=\"color: #0000ff;\">ContentView<\/span><\/code>. \u0414\u0430\u0432\u0430\u0439\u0442\u0435\u00a0 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0444\u0438\u043b\u044c\u043c\u0430 <code><span style=\"color: #0000ff;\">movie<\/span><\/code> \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043a\u0438\u043d\u043e\u043f\u043e\u0441\u0442\u0435\u0440 <code><span style=\"color: #0000ff;\">MoviePosterImage<\/span><\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u043c \u0432\u00a0 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0442\u0435\u043a\u0435 <code><span style=\"color: #0000ff;\">HStack<\/span><\/code>:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-10.24.10.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11792 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-10.24.10.png\" alt=\"\" width=\"1050\" height=\"1262\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-10.24.10.png 1050w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-10.24.10-250x300.png 250w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-10.24.10-768x923.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-10.24.10-852x1024.png 852w\" sizes=\"auto, (max-width: 1050px) 100vw, 1050px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0444\u0438\u043b\u044c\u043c\u043e\u0432 \u0441 \u043a\u0438\u043d\u043e\u043f\u043e\u0441\u0442\u0435\u0440\u0430\u043c\u0438:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-14-at-20.28.04.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11652 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-14-at-20.28.04.png\" alt=\"\" width=\"1162\" height=\"1566\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-14-at-20.28.04.png 1162w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-14-at-20.28.04-223x300.png 223w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-14-at-20.28.04-768x1035.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-14-at-20.28.04-760x1024.png 760w\" sizes=\"auto, (max-width: 1162px) 100vw, 1162px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432 <code><span style=\"color: #0000ff;\">ContentView<\/span><\/code>\u00a0\u0432\u043c\u0435\u0441\u0442\u043e <code><span style=\"color: #0000ff;\">List<\/span><\/code> \u0434\u043b\u044f \u0441\u043f\u0438\u0441\u043a\u0430 \u0444\u0438\u043b\u044c\u043c\u043e\u0432 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439\u00a0<code><span style=\"color: #0000ff;\">MoviesList<\/span><\/code><\/span>:<\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-10.36.01.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11794 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-10.36.01.png\" alt=\"\" width=\"1076\" height=\"788\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-10.36.01.png 1076w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-10.36.01-300x220.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-10.36.01-768x562.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-10.36.01-1024x750.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-10.36.01-410x300.png 410w\" sizes=\"auto, (max-width: 1076px) 100vw, 1076px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 <code><span style=\"color: #0000ff;\">ContentView<\/span><\/code> \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u0441\u044f:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-20.55.28.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11694 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-20.55.28.png\" alt=\"\" width=\"1760\" height=\"1384\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-20.55.28.png 1760w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-20.55.28-300x236.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-20.55.28-768x604.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-20.55.28-1024x805.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-20.55.28-382x300.png 382w\" sizes=\"auto, (max-width: 1760px) 100vw, 1760px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u0439\u043c\u0435\u043c\u0441\u044f \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u0430\u043a\u0442\u0435\u0440\u043e\u0432 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0444\u0438\u043b\u044c\u043c\u0430 \u0441 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c\u00a0<code><span style=\"color: #0000ff;\">movieId<\/span><\/code>. \u0414\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0430\u043a\u0442\u0435\u0440\u043e\u0432 \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445\u00a0<a href=\"https:\/\/developers.themoviedb.org\/3\/getting-started\/introduction\">TMDb<\/a>\u00a0\u0432 <code><span style=\"color: #0000ff;\">MovieAPI<\/span><\/code>\u00a0\u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code><span style=\"color: #0000ff;\">fetchCredits (for: movieId)<\/span><\/code>:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-21.13.11.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11784 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-21.13.11.png\" alt=\"\" width=\"1074\" height=\"500\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-21.13.11.png 1074w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-21.13.11-300x140.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-21.13.11-768x358.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-21.13.11-1024x477.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-21.13.11-500x233.png 500w\" sizes=\"auto, (max-width: 1074px) 100vw, 1074px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u041c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c\u00a0<code>View Model<\/code> \u0434\u043b\u044f \u0441\u043f\u0438\u0441\u043a\u0430 \u0430\u043a\u0442\u0435\u0440\u043e\u0432 \u0432 \u0432\u0438\u0434\u0435 \u043a\u043b\u0430\u0441\u0441\u0430\u00a0<code><span style=\"color: #0000ff;\">CastViewModel<\/span><\/code>\u00a0\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u043c \u043f\u043e \u0442\u043e\u0439 \u0436\u0435 \u0441\u0445\u0435\u043c\u0435: \u043d\u0430\u0448 \u043a\u043b\u0430\u0441\u0441 <code><span style=\"color: #0000ff;\">CastViewModel<\/span><\/code>\u00a0\u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b <code><span style=\"color: #0000ff;\">ObservableObject<\/span><\/code>. \u0423 \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0435\u0441\u0442\u044c \u0434\u0432\u0430\u00a0<code><span style=\"color: #0000ff;\">@Published<\/span><\/code> \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430: <\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u043e\u0434\u043d\u043e .\u00a0 &#8212;\u00a0\u00a0<code><span style=\"color: #0000ff;\">@Published var movieId\u00a0<\/span><\/code>&#8212; \u044d\u0442\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0444\u0438\u043b\u044c\u043c\u0430,\u00a0<\/span><br \/>\n<span style=\"font-weight: 400;\">\u0434\u0440\u0443\u0433\u043e\u0435 &#8212;\u00a0\u00a0<code><span style=\"color: #0000ff;\">@Published var casts: [MovieCast]<\/span><\/code>\u00a0&#8212; \u0441\u043f\u0438\u0441\u043e\u043a \u0430\u043a\u0442\u0451\u0440\u043e\u0432 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u0438\u043b\u044c\u043c\u0430. <\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-21.18.21-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11786 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-21.18.21-1.png\" alt=\"\" width=\"1094\" height=\"854\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-21.18.21-1.png 1094w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-21.18.21-1-300x234.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-21.18.21-1-768x600.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-21.18.21-1-1024x799.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-21.18.21-1-384x300.png 384w\" sizes=\"auto, (max-width: 1094px) 100vw, 1094px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u041f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u043a\u043b\u0430\u0441\u0441\u0430\u00a0<code><span style=\"color: #0000ff;\">CastViewModel,<\/span><\/code>\u00a0\u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u043e\u0442\u044f\u043d\u0443\u0442\u044c \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u043e\u0442 \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187;\u00a0<code><span style=\"color: #0000ff;\">$movieId\u00a0<\/span><\/code>\u00a0\u0434\u043e \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187;\u00a0<code><span style=\"color: #0000ff;\">AnyPublisher&lt;[MovieCast], Never&gt;<\/span><\/code>, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0437\u0430\u0442\u0435\u043c \u043c\u044b &#171;\u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u0441\u044f&#187; \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432 \u0430\u043a\u0442\u0435\u0440\u043e\u0432\u00a0<code><span style=\"color: #0000ff;\">[MovieCast]<\/span><\/code>.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0418 \u043e\u043f\u044f\u0442\u044c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439\u00a0<code><span style=\"color: #0000ff;\">cancellableSet<\/span><\/code> \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442\u0441\u044f <code><span style=\"color: #0000ff;\">AnyCancellable<\/span><\/code> &#171;\u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430&#187; \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u00a0<code><span style=\"color: #0000ff;\">store(in: &amp;self.cancellableSet)<\/span><\/code>.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c <code>View Model<\/code> \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u0430\u043a\u0442\u0435\u0440\u043e\u0432, \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e <code>UI<\/code>. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443\u00a0<code><span style=\"color: #0000ff;\">CastsList<\/span><\/code>\u00a0\u043d\u0430\u0448\u0443\u00a0<code>View Model<\/code> \u043a\u0430\u043a\u00a0<code><span style=\"color: #0000ff;\">@ObservedObject<\/span><\/code> \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code><span style=\"color: #0000ff;\">var castsViewModel<\/span><\/code> \u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0430\u043a\u0442\u0435\u0440\u043e\u0432\u00a0<code><span style=\"color: #0000ff;\">castViewModel.casts<\/span><\/code> \u0432 \u0432\u0438\u0434\u0435 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e\u00a0<code><span style=\"color: #0000ff;\">ScrollView<\/span><\/code> \u0438 <code><span style=\"color: #0000ff;\">HStack<\/span><\/code>:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-16-at-16.04.39.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11655 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-16-at-16.04.39.png\" alt=\"\" width=\"1050\" height=\"724\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-16-at-16.04.39.png 1050w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-16-at-16.04.39-300x207.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-16-at-16.04.39-768x530.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-16-at-16.04.39-1024x706.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-16-at-16.04.39-435x300.png 435w\" sizes=\"auto, (max-width: 1050px) 100vw, 1050px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u043a\u0440\u0443\u0447\u0438\u0432\u0430\u0435\u043c\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0430\u043a\u0442\u0435\u0440\u043e\u0432:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-16-at-16.33.18.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11657 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-16-at-16.33.18.png\" alt=\"\" width=\"1430\" height=\"1394\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-16-at-16.33.18.png 1430w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-16-at-16.33.18-300x292.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-16-at-16.33.18-768x749.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-16-at-16.33.18-1024x998.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-16-at-16.33.18-308x300.png 308w\" sizes=\"auto, (max-width: 1430px) 100vw, 1430px\" \/><\/a><br \/>\n<span style=\"font-weight: 400;\">\u042d\u0442\u043e\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 <code><span style=\"color: #0000ff;\">DetailView<\/span><\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0444\u0438\u043b\u044c\u043c\u0435 <code><span style=\"color: #0000ff;\">movie<\/span><\/code>:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-17.04.48.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11690 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-17.04.48.png\" alt=\"\" width=\"1854\" height=\"1430\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-17.04.48.png 1854w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-17.04.48-300x231.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-17.04.48-768x592.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-17.04.48-1024x790.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-17.04.48-389x300.png 389w\" sizes=\"auto, (max-width: 1854px) 100vw, 1854px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0417\u0434\u0435\u0441\u044c \u0443 \u043d\u0430\u0441 \u0438 \u043f\u043e\u0441\u0442\u0435\u0440 \u0444\u0438\u043b\u044c\u043c\u0430 <code><span style=\"color: #0000ff;\">MoviePosterImage<\/span><\/code>, \u0438 \u0435\u0433\u043e \u043a\u0440\u0430\u0442\u043a\u043e\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 <code><span style=\"color: #0000ff;\">movie.overview<\/span><\/code>, \u0438 \u0434\u0430\u0442\u0430 \u0432\u044b\u043f\u0443\u0441\u043a\u0430 <code><span style=\"color: #0000ff;\">movie.releaseDate<\/span><\/code>, \u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0430\u043a\u0442\u0435\u0440\u043e\u0432 <code><span style=\"color: #0000ff;\">CastsList<\/span><\/code>.<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><code><span style=\"color: #0000ff;\">DetailView<\/span><\/code> \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 <code><span style=\"color: #0000ff;\">NavigationLink<\/span><\/code> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 <code><span style=\"color: #0000ff;\">destination<\/span><\/code> \u0434\u043b\u044f \u0441\u043f\u0438\u0441\u043a\u0430 \u0444\u0438\u043b\u044c\u043c\u043e\u0432 <code><span style=\"color: #0000ff;\">MoviesList<\/span><\/code>:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-20.42.37.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11692 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-20.42.37.png\" alt=\"\" width=\"1284\" height=\"894\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-20.42.37.png 1284w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-20.42.37-300x209.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-20.42.37-768x535.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-20.42.37-1024x713.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-20.42.37-431x300.png 431w\" sizes=\"auto, (max-width: 1284px) 100vw, 1284px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043b\u044e\u0431\u043e\u043c \u0444\u0438\u043b\u044c\u043c\u0435 \u0438\u0437 \u044d\u0442\u0438\u0445 \u0441\u043f\u0438\u0441\u043a\u043e\u0432:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-21.03.26.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11695 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-21.03.26.png\" alt=\"\" width=\"1566\" height=\"1408\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-21.03.26.png 1566w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-21.03.26-300x270.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-21.03.26-768x691.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-21.03.26-1024x921.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-21.03.26-334x300.png 334w\" sizes=\"auto, (max-width: 1566px) 100vw, 1566px\" \/><\/a><\/p>\n<h1>\u0424\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u0444\u0438\u043b\u044c\u043c\u043e\u0432 \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443.<\/h1>\n<p><span style=\"font-weight: 400;\">\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a\u0430\u044f \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u0430\u00a0<code>View Model<\/code>\u00a0\u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u0444\u0438\u043b\u044c\u043c\u043e\u0432, \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0439\u0441\u044f \u0432 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0438 \u0444\u0438\u043b\u044c\u043c\u043e\u0432:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-21.21.52.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11696 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-21.21.52.png\" alt=\"\" width=\"1392\" height=\"1402\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-21.21.52.png 1392w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-21.21.52-150x150.png 150w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-21.21.52-298x300.png 298w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-21.21.52-768x774.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-21.21.52-1017x1024.png 1017w\" sizes=\"auto, (max-width: 1392px) 100vw, 1392px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a\u043e\u0439 \u0442\u0435\u043a\u0441\u0442 \u0432 \u043f\u043e\u043b\u0435 \u043f\u043e\u0438\u0441\u043a\u0430 \u043d\u0430\u0431\u0435\u0440\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0444\u0438\u043b\u044c\u043c\u043e\u0432 <code><span style=\"color: #0000ff;\">movies<\/span><\/code>, \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0441 \u0441\u0430\u0439\u0442\u0430<a href=\"https:\/\/developers.themoviedb.org\/3\/getting-started\/introduction\">\u00a0TMDb<\/a>:\u00a0\u00a0<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-21.32.11.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11698 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-21.32.11.png\" alt=\"\" width=\"1154\" height=\"1218\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-21.32.11.png 1154w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-21.32.11-284x300.png 284w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-21.32.11-768x811.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-16-at-21.32.11-970x1024.png 970w\" sizes=\"auto, (max-width: 1154px) 100vw, 1154px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0412 \u043a\u043b\u0430\u0441\u0441\u0435\u00a0<code><span style=\"color: #0000ff;\">MoviesSearchViewModel<\/span><\/code>, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0435\u043c \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b <code><span style=\"color: #0000ff;\">ObservableObject<\/span><\/code>,\u00a0\u0443 \u043d\u0430\u0441 \u043e\u043f\u044f\u0442\u044c \u0434\u0432\u0430 <code><span style=\"color: #0000ff;\">@Published<\/span><\/code> \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430: <code><span style=\"color: #0000ff;\">\u00a0@Published var name: String<\/span><\/code>\u00a0&#8212; \u044d\u0442\u043e \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430,\u00a0\u0434\u0440\u0443\u0433\u043e\u0435 &#8212;\u00a0<code><span style=\"color: #0000ff;\">@Published var movies: [Movie]<\/span><\/code>\u00a0&#8212; \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0444\u0438\u043b\u044c\u043c\u043e\u0432 \u0438\u0437 \u0431\u0430\u0437\u044b\u00a0<a href=\"https:\/\/developers.themoviedb.org\/3\/getting-started\/introduction\">TMDb<\/a>. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u041f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u043a\u043b\u0430\u0441\u0441\u0430 <code><span style=\"color: #0000ff;\">MoviesSearchViewModel<\/span><\/code> \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u043e\u0442\u044f\u043d\u0443\u0442\u044c \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u043e\u0442 \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187;\u00a0<code><span style=\"color: #0000ff;\">$name\u00a0<\/span><\/code>\u00a0\u0434\u043e \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187;\u00a0<code><span style=\"color: #0000ff;\">AnyPublisher&lt;[Movie], Never&gt;<\/span><\/code>, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e\u00a0 \u043c\u044b &#171;\u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u0441\u044f&#187; \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432 \u0444\u0438\u043b\u044c\u043c\u043e\u0432\u00a0<code><span style=\"color: #0000ff;\">[Movie]<\/span><\/code>. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0434\u043b\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u0432\u0432\u043e\u0434\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c &#171;\u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u0442\u0441\u044f&#187;\u00a0<code><span style=\"color: #0000ff;\">$name<\/span><\/code> \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u00a0<code><span style=\"color: #0000ff;\">debounce<\/span><\/code>,\u00a0\u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u0438\u0433\u043d\u0430\u043b \u0432 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c \u043e\u043a\u043d\u0435 <code><span style=\"color: #0000ff;\">0.1<\/span><\/code> :<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-19.58.01.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11799 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-19.58.01.png\" alt=\"\" width=\"1022\" height=\"114\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-19.58.01.png 1022w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-19.58.01-300x33.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-19.58.01-768x86.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-19.58.01-500x56.png 500w\" sizes=\"auto, (max-width: 1022px) 100vw, 1022px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u00a0<code><span style=\"color: #0000ff;\">removeDuplicates<\/span><\/code> \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u0438 \u0438 \u0442\u0435 \u0436\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u043d\u043e\u0432\u0430 \u0438 \u0441\u043d\u043e\u0432\u0430 \u0432 \u044d\u0442\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c \u043e\u043a\u043d\u0435:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.00.07.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11800 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.00.07.png\" alt=\"\" width=\"1016\" height=\"110\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.00.07.png 1016w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.00.07-300x32.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.00.07-768x83.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.00.07-500x54.png 500w\" sizes=\"auto, (max-width: 1016px) 100vw, 1016px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0443\u0436\u0435 \u0438\u043c\u0435\u044e\u0449\u0443\u044e\u0441\u044f \u0432\u00a0\u043d\u0430\u0448\u0435\u043c <code><span style=\"color: #0000ff;\">MovieAPI<\/span><\/code> \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code><span style=\"color: #0000ff;\">fetchMovies (from: Endpoint)<\/span><\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187;\u00a0<code><span style=\"color: #0000ff;\">AnyPublisher&lt;[Movie], Never&gt;<\/span><\/code> \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u00a0<code><span style=\"color: #0000ff;\">Endpoint<\/span><\/code>, \u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f <code><span style=\"color: #0000ff;\">$name&gt;<\/span><\/code> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f <code><span style=\"color: #0000ff;\">Endpoint.search(name)<\/span><\/code>.\u00a0\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 <code>Combine<\/code> \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u00a0\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u00a0<code><span style=\"color: #0000ff;\">flatMap<\/span><\/code>:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.02.12.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11801 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.02.12.png\" alt=\"\" width=\"1086\" height=\"212\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.02.12.png 1086w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.02.12-300x59.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.02.12-768x150.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.02.12-1024x200.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.02.12-500x98.png 500w\" sizes=\"auto, (max-width: 1086px) 100vw, 1086px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0412\u043d\u0443\u0442\u0440\u0438\u00a0<code><span style=\"color: #0000ff;\">flatMap <\/span><\/code> \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e\u00a0<code><span style=\"color: #0000ff;\">MovieAPI.shared.fetchMovies (from:.search(searchString: name))<\/span><\/code> \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0434\u043b\u0438\u043d\u0430 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0443\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d <code><span style=\"color: #0000ff;\">2...30<\/span><\/code>. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043f\u0443\u0441\u0442\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0444\u0438\u043b\u044c\u043c\u043e\u0432 <code><span style=\"color: #0000ff;\">[Movie]( )<\/span><\/code>.\u00a0\u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0434\u043e\u0431\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187; <code><span style=\"color: #0000ff;\">Future<\/span><\/code> \u0438 \u0435\u0433\u043e \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u0435 <code><span style=\"color: #0000ff;\"> promise<\/span><\/code>:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.03.50.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11802 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.03.50.png\" alt=\"\" width=\"1092\" height=\"496\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.03.50.png 1092w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.03.50-300x136.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.03.50-768x349.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.03.50-1024x465.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.03.50-500x227.png 500w\" sizes=\"auto, (max-width: 1092px) 100vw, 1092px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\"><span style=\"color: #0000ff;\"><span style=\"color: #000000;\">\u0414\u0430\u043b\u0435\u0435 \u043c\u044b &#171;\u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u0441\u044f&#187; \u043d\u0430 \u044d\u0442\u043e\u0433\u043e \u0432\u043d\u043e\u0432\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187; \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e &#171;\u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u0430&#187;\u00a0<code><span style=\"color: #0000ff;\">assign (to: \\.movies, on: self)<\/span><\/code> \u0438 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u043c \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u043e\u0442 &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187; \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code><span style=\"color: #0000ff;\">@Published<\/span><\/code>\u00a0\u043c\u0430\u0441\u0441\u0438\u0432\u0443\u00a0<code><span style=\"color: #0000ff;\">movies<\/span><\/code>:<\/span><\/span><\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.06.16.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11803 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.06.16.png\" alt=\"\" width=\"1052\" height=\"606\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.06.16.png 1052w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.06.16-300x173.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.06.16-768x442.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.06.16-1024x590.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.06.16-500x288.png 500w\" sizes=\"auto, (max-width: 1052px) 100vw, 1052px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0412 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439\u00a0<code><span style=\"color: #0000ff;\">cancellableSet<\/span><\/code> \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442\u0441\u044f\u00a0\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0430\u044f &#171;\u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430&#187; \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u00a0<code><span style=\"color: #0000ff;\">store(in: &amp;self.cancellableSet)<\/span><\/code>. \u042d\u0442\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 &#171;\u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438&#187; \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0433\u043e \u201c\u0436\u0438\u0437\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430\u201d \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u043a\u043b\u0430\u0441\u0441\u0430 <code><span style=\"color: #0000ff;\">MoviesSearchViewModel<\/span><\/code>\u00a0:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.09.05.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11804 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.09.05.png\" alt=\"\" width=\"1012\" height=\"216\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.09.05.png 1012w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.09.05-300x64.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.09.05-768x164.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.09.05-500x107.png 500w\" sizes=\"auto, (max-width: 1012px) 100vw, 1012px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c <code>View Model<\/code> \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0444\u0438\u043b\u044c\u043c\u043e\u0432, \u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e\u00a0<code>UI<\/code>. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0412 SwiftUI c\u043e\u0437\u0434\u0430\u0451\u043c \u043d\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 <code><span style=\"color: #0000ff;\">ContentViewSearch<\/span><\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432\u0441\u0435\u0433\u043e \u0438\u0437 2-\u0445 <code><span style=\"color: #0000ff;\">View<\/span><\/code>: \u043e\u0434\u043d\u043e <code><span style=\"color: #0000ff;\">SearchView<\/span><\/code> &#8212; \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438, \u0432\u0442\u043e\u0440\u043e\u0435\u00a0<code><span style=\"color: #0000ff;\">MoviesList<\/span><\/code> &#8212; \u0441\u043f\u0438\u0441\u043e\u043a &#171;\u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445&#187;\u0444\u0438\u043b\u044c\u043c\u043e\u0432:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.16.36.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11805 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.16.36.png\" alt=\"\" width=\"948\" height=\"530\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.16.36.png 948w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.16.36-300x168.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.16.36-768x429.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.16.36-500x280.png 500w\" sizes=\"auto, (max-width: 948px) 100vw, 948px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u00a0<code><span style=\"color: #0000ff;\">@ObservedObject<\/span><\/code> \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439\u00a0<code><span style=\"color: #0000ff;\">var moviesModel<\/span><\/code>\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430\u00a0<code><span style=\"color: #0000ff;\">MoviesSearchViewModel<\/span><\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c &#171;\u0443\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c&#187; \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u0435&#187; <code><span style=\"color: #0000ff;\"> $moviesModel.name<\/span><\/code><\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-17-at-21.30.15.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11701 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-17-at-21.30.15.png\" alt=\"\" width=\"1644\" height=\"1428\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-17-at-21.30.15.png 1644w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-17-at-21.30.15-300x261.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-17-at-21.30.15-768x667.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-17-at-21.30.15-1024x889.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-17-at-21.30.15-345x300.png 345w\" sizes=\"auto, (max-width: 1644px) 100vw, 1644px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">&#8230;\u0438 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c\u00a0\u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0444\u0438\u043b\u044c\u043c\u043e\u0432\u00a0<code><span style=\"color: #0000ff;\">moviesModel.movies<\/span><\/code> \u0438\u0437 \u0431\u0430\u0437\u044b\u00a0\u0444\u0438\u043b\u044c\u043c\u043e\u0432\u00a0<a href=\"https:\/\/developers.themoviedb.org\/3\/getting-started\/introduction\">TMDb<\/a>:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-18-at-15.36.09.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11702 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-18-at-15.36.09.png\" alt=\"\" width=\"1424\" height=\"1426\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-18-at-15.36.09.png 1424w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-18-at-15.36.09-150x150.png 150w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-18-at-15.36.09-300x300.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-18-at-15.36.09-768x769.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-18-at-15.36.09-1024x1024.png 1024w\" sizes=\"auto, (max-width: 1424px) 100vw, 1424px\" \/><\/a><\/p>\n<h1>\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u043f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u043a\u0435 \u0438 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 JSON \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/h1>\n<p><span style=\"font-weight: 400;\">\u041f\u0440\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0432\u044b \u0437\u0430\u0434\u0430\u043b\u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 <code>API-key<\/code> \u0438\u043b\u0438 \u043f\u0440\u0435\u0432\u044b\u0441\u0438\u043b\u0438 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438\u043b\u0438 \u0435\u0449\u0435 \u0447\u0442\u043e-\u0442\u043e. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c\u00a0\u0441\u0435\u0440\u0432\u0435\u0440\u00a0<a href=\"https:\/\/developers.themoviedb.org\/3\/getting-started\/introduction\">TMDb<\/a>\u00a0 \u0441\u043d\u0430\u0431\u0436\u0430\u0435\u0442 \u0432\u0430\u0441 HTTP \u043a\u043e\u0434\u043e\u043c \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435\u043c.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u043e\u0448\u0438\u0431\u043a\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0418\u043d\u0430\u0447\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u043f\u0430\u0434\u0451\u0442 \u0432 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e, \u043a\u043e\u0433\u0434\u0430 \u0432\u0434\u0440\u0443\u0433 \u043d\u0438 \u0441 \u0442\u043e\u0433\u043e, \u043d\u0438 \u0441 \u0441\u0435\u0433\u043e, \u0441\u0435\u0440\u0432\u0435\u0440\u00a0<a href=\"https:\/\/developers.themoviedb.org\/3\/getting-started\/introduction\">TMDb<\/a>\u00a0\u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u043b\u0438\u0431\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u043f\u043e\u043b\u043d\u043e\u043c \u043d\u0435\u0434\u043e\u0443\u043c\u0435\u043d\u0438\u0438 \u0441 \u043f\u0443\u0441\u0442\u044b\u043c \u044d\u043a\u0440\u0430\u043d\u043e\u043c.<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u0414\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u043a\u0435 \u0444\u0438\u043b\u044c\u043c\u043e\u0432\u00a0<code><span style=\"color: #0000ff;\">[Movie]<\/span><\/code> \u0438 \u0430\u043a\u0442\u0435\u0440\u043e\u0432\u00a0<code><span style=\"color: #0000ff;\">[MovieCast]<\/span><\/code> \u0441\u00a0\u0441\u0435\u0440\u0432\u0435\u0440\u0430\u00a0<a href=\"https:\/\/developers.themoviedb.org\/3\/getting-started\/introduction\">TMDb<\/a>\u00a0 \u043c\u044b \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0432\u0441\u0435 \u043e\u0448\u0438\u0431\u043a\u0438, \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0445 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u043b\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043f\u0443\u0441\u0442\u044b\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u044b\u00a0<code><span style=\"color: #0000ff;\">[Movie]()<\/span><\/code> \u0438\u00a0 \u00a0<code><span style=\"color: #0000ff;\">[MovieCast]]()<\/span><\/code>.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u044f \u043a \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043e\u0448\u0438\u0431\u043e\u043a,\u00a0<\/span><span style=\"font-weight: 400;\">\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e\u00a0 \u043c\u0435\u0442\u043e\u0434\u0430 <code><span style=\"color: #0000ff;\">fetchMovies (from endpoint: Endpoint) -&gt; AnyPublisher&lt;[Movie], Never&gt;<\/span><\/code> \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0432 <code><span style=\"color: #0000ff;\">MovieAPI<\/span><\/code>\u00a0\u0434\u0440\u0443\u0433\u043e\u0439 \u043c\u0435\u0442\u043e\u0434 <code><span style=\"color: #0000ff;\">fetchMoviesErr (from endpoint: Endpoint) -&gt; AnyPublisher&lt;[Movie], MovieError&gt;<\/span><\/code> \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0444\u0438\u043b\u044c\u043c\u043e\u0432 \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u043e\u0439:<\/span><\/p>\n<pre class=\"line-numbers\"><code class=\"language-swift\">func fetchMoviesErr(from endpoint: Endpoint) -&gt;\r\n                            AnyPublisher&lt;[Movie], MovieError&gt; {\r\n\r\n. . . . . . . .\r\n}<\/code><\/pre>\n<p><span style=\"font-weight: 400;\">\u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434, \u0442\u0430\u043a\u0436\u0435, \u043a\u0430\u043a \u0438 \u043c\u0435\u0442\u043e\u0434\u00a0<code><span style=\"color: #0000ff;\">fetchMovies<\/span><\/code>, \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 <code><span style=\"color: #0000ff;\">endpoint<\/span><\/code>\u00a0\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187; \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0432 \u0432\u0438\u0434\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0444\u0438\u043b\u044c\u043c\u043e\u0432\u00a0<code><span style=\"color: #0000ff;\">[Movie]<\/span><\/code>, \u043d\u043e \u0432\u043c\u0435\u0441\u0442\u043e \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u043e\u0448\u0438\u0431\u043a\u0438 <code><span style=\"color: #0000ff;\">Never,<\/span><\/code> \u0443 \u043d\u0430\u0441 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0430, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c\u0430\u044f \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435\u043c <code><span style=\"color: #0000ff;\">MovieError<\/span><\/code>:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-10.53.48.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11795 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-10.53.48.png\" alt=\"\" width=\"1008\" height=\"290\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-10.53.48.png 1008w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-10.53.48-300x86.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-10.53.48-768x221.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-10.53.48-1000x288.png 1000w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-10.53.48-500x144.png 500w\" sizes=\"auto, (max-width: 1008px) 100vw, 1008px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u041d\u0430\u0447\u043d\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0441 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187;\u00a0<code><span style=\"color: #0000ff;\">Future<\/span><\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0422\u0418\u041f\u0410 <code><span style=\"color: #0000ff;\">Result<\/span><\/code> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u044f. \u0423 \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u044f \u043e\u0434\u0438\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 &#8212; <code><span style=\"color: #0000ff;\">Promise<\/span><\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0422\u0418\u041f\u0430\u00a0<code><span style=\"color: #0000ff;\">(Result&lt;Output, Failure&gt;) -&gt; Void<\/span><\/code>:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.25.03.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11806 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.25.03.png\" alt=\"\" width=\"1082\" height=\"310\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.25.03.png 1082w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.25.03-300x86.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.25.03-768x220.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.25.03-1024x293.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.25.03-1000x288.png 1000w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.25.03-500x143.png 500w\" sizes=\"auto, (max-width: 1082px) 100vw, 1082px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 <code><span style=\"color: #0000ff;\">Future<\/span><\/code> \u043c\u044b \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043b\u0438 \u0432 <code><span style=\"color: #0000ff;\">AnyPublisher &lt;[Movie], MovieError&gt;<\/span><\/code> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 &#171;\u0441\u0442\u0438\u0440\u0430\u043d\u0438\u044f \u0422\u0418\u041f\u0410&#187; <code><span style=\"color: #0000ff;\">eraseToAnyPublisher()<\/span><\/code>.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u043c \u0432\u0441\u0435 \u0448\u0430\u0433\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0434\u0435\u043b\u0430\u043b\u0438 \u0432 \u043c\u0435\u0442\u043e\u0434\u0435\u00a0<code><span style=\"color: #0000ff;\">fetchMovies<\/span><\/code>, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u043c \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.46.00.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11807 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.46.00.png\" alt=\"\" width=\"1204\" height=\"1422\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.46.00.png 1204w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.46.00-254x300.png 254w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.46.00-768x907.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-20.46.00-867x1024.png 867w\" sizes=\"auto, (max-width: 1204px) 100vw, 1204px\" \/><\/a><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\"><strong>0.<\/strong> \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 <code><span style=\"color: #0000ff;\">endpoint<\/span><\/code>\u00a0\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c <code>URL<\/code> <code><span style=\"color: #0000ff;\">endpoint.absoluteURL<\/span><\/code> \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043d\u0443\u0436\u043d\u043e\u0439 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0444\u0438\u043b\u044c\u043c\u043e\u0432, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c <code><span style=\"color: #0000ff;\">url<\/span><\/code> \u043d\u0430 <code><span style=\"color: #0000ff;\">nil:<\/span><\/code> \u0435\u0441\u043b\u0438 <code><span style=\"color: #0000ff;\">nil<\/span><\/code>, \u0442\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443 <code><span style=\"color: #ff6600;\">.urlError<\/span><\/code>, \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 &#8212; \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c <code><span style=\"color: #0000ff;\">url<\/span><\/code> \u0434\u0430\u043b\u0435\u0435 \u043f\u043e \u0446\u0435\u043f\u043e\u0447\u043a\u0435,<\/span><\/li>\n<li><span style=\"font-weight: 400;\"><strong>1.<\/strong> \u0441\u043e\u0437\u0434\u0430\u0435\u043c &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187; <code><span style=\"color: #0000ff;\">dataTaskPublisher(for:)<\/span><\/code>, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 &#8212; <code><span style=\"color: #0000ff;\">url<\/span><\/code>, \u0430 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <code><span style=\"color: #0000ff;\">Output<\/span><\/code> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u0440\u0442\u0435\u0436 <code><span style=\"color: #0000ff;\">(data: Data, response: URLResponse)<\/span><\/code> \u0438 \u043e\u0448\u0438\u0431\u043a\u0430\u00a0<code><span style=\"color: #0000ff;\">URLError<\/span><\/code>,<br \/>\n<\/span><\/li>\n<li><span style=\"font-weight: 400;\"><strong>2.<\/strong> \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code><span style=\"color: #0000ff;\">tryMap { }<\/span><\/code>\u00a0\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0440\u0442\u0435\u0436\u0430 <code><span style=\"color: #0000ff;\">(data: Data, response: URLResponse)<\/span><\/code>: \u0435\u0441\u043b\u0438 <code><span style=\"color: #0000ff;\">response.statusCode<\/span><\/code> \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 <code><span style=\"color: #0000ff;\">200...299<\/span><\/code>, \u0442\u043e \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0431\u0435\u0440\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0430\u043d\u043d\u044b\u0435\u00a0<code><span style=\"color: #0000ff;\">data<\/span><\/code>. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 &#171;\u0432\u044b\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c&#187; \u043e\u0448\u0438\u0431\u043a\u0443 <code><span style=\"color: #ff6600;\">.responseError<\/span><\/code>,<\/span><\/li>\n<li><span style=\"font-weight: 400;\"><strong>3.<\/strong> \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u0443\u0435\u043c <code>JSON<\/code> \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u041c\u043e\u0434\u0435\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439\u00a0<code><span style=\"color: #0000ff;\">MoviesResponse<\/span><\/code>,<\/span><\/li>\n<li><span style=\"font-weight: 400;\"><strong>4.<\/strong> \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430 <code>main<\/code> \u043f\u043e\u0442\u043e\u043a, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438<code> UI<\/code><\/span><\/li>\n<li><span style=\"font-weight: 400;\">&#171;\u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u0441\u044f&#187; \u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187; \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code><span style=\"color: #0000ff;\">sink<\/span><\/code> \u0438 \u0435\u0433\u043e \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u0439 <code><span style=\"color: #0000ff;\">receiveCompletion<\/span><\/code> \u0438 <code><span style=\"color: #0000ff;\">receiveValue<\/span>,<\/code><\/span><\/li>\n<\/ul>\n<p style=\"padding-left: 60px;\"><span style=\"font-weight: 400;\"><strong>5.<\/strong>\u00a0\u0435\u0441\u043b\u0438 \u0432\u00a0\u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u0438\u00a0<code><span style=\"color: #0000ff;\">receiveCompletion<\/span><\/code>\u00a0\u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443 <code><span style=\"color: #ff6600;\">error<\/span><\/code>, \u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u043c \u043e \u043d\u0435\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code><span style=\"color: #0000ff;\">promise (<span style=\"color: #ff0000;\">.failure(...)<\/span>))<\/span><\/code>,<\/span><\/p>\n<p style=\"padding-left: 60px;\"><span style=\"font-weight: 400;\"><strong>6.<\/strong>\u00a0\u0432\u00a0\u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u0438\u00a0<code><span style=\"color: #0000ff;\">receiveValue<\/span><\/code> \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u043c \u043e\u0431 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0444\u0438\u043b\u044c\u043c\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code><span style=\"color: #0000ff;\">promise (.success($0.results))<\/span><\/code>,\u00a0<\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\"><strong>7.<\/strong>\u00a0\u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0443\u044e &#171;\u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443&#187; \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439\u00a0<code><span style=\"color: #0000ff;\">var subscriptions = Set&lt;AnyCancellable&gt;()<\/span><\/code>, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0435\u0451 \u0436\u0438\u0437\u043d\u0435\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 &#171;\u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0436\u0438\u0437\u043d\u0438&#187; \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u043a\u043b\u0430\u0441\u0441\u0430 <code><span style=\"color: #0000ff;\">MovieAPI<\/span><\/code>,<\/span><\/li>\n<li><span style=\"font-weight: 400;\"><strong>8.<\/strong> &#171;\u0441\u0442\u0438\u0440\u0430\u0435\u043c&#187; \u0422\u0418\u041f &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187; \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 <code><span style=\"color: #0000ff;\">AnyPublisher<\/span><\/code>.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">\u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044c&#187;\u00a0<code><span style=\"color: #0000ff;\">dataTaskPublisher(for:)<\/span><\/code> <a href=\"https:\/\/oleb.net\/2020\/urlsession-publisher\/\">\u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f<\/a> \u043e\u0442 \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0430 <code><span style=\"color: #0000ff;\">dataTask<\/span><\/code> \u0442\u0435\u043c, \u0447\u0442\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043a\u043e\u0433\u0434\u0430 <code><span style=\"color: #0000ff;\">response.statusCode<\/span><\/code>\u00a0\u041d\u0415 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 <code><span style=\"color: #0000ff;\">200...299<\/span><\/code>, \u043e\u043d \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u00a0\u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0432\u0438\u0434\u0435 \u043a\u043e\u0440\u0442\u0435\u0436\u0430 <code><span style=\"color: #0000ff;\">(data: Data, response: URLResponse)<\/span><\/code>, \u0430 \u043d\u0435\u00a0\u043e\u0448\u0438\u0431\u043a\u0443 \u0432 \u0432\u0438\u0434\u0435 <code><span style=\"color: #0000ff;\">(Error, URLResponse?)<\/span><\/code>. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0432 <code><span style=\"color: #0000ff;\">data<\/span><\/code>. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0415\u0441\u043b\u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438, \u0442\u043e \u043d\u0443\u0436\u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0430\u044f <code>View Model<\/code>, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u043d\u0430\u0437\u043e\u0432\u0435\u043c\u00a0<code><span style=\"color: #0000ff;\">MoviesViewModelErr<\/span><\/code>:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-21.19.27.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11808 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-21.19.27.png\" alt=\"\" width=\"1006\" height=\"1346\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-21.19.27.png 1006w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-21.19.27-224x300.png 224w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-21.19.27-768x1028.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-21.19.27-765x1024.png 765w\" sizes=\"auto, (max-width: 1006px) 100vw, 1006px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0412 \u043a\u043b\u0430\u0441\u0441\u0435\u00a0<code><span style=\"color: #0000ff;\">MoviesViewModelErr<\/span><\/code>, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0435\u043c \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b <code><span style=\"color: #0000ff;\">ObservableObject<\/span><\/code>,\u00a0\u0443 \u043d\u0430\u0441 \u043d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u0422\u0420\u0418\u00a0<code><span style=\"color: #0000ff;\">@Published<\/span><\/code> \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430: <\/span><\/p>\n<ol>\n<li><span style=\"font-weight: 400;\"><code><span style=\"color: #0000ff;\">\u00a0@Published var indexEndpoint: Int<\/span><\/code> &#8212; \u044d\u0442\u043e \u0438\u043d\u0434\u0435\u043a\u0441 <code><span style=\"color: #0000ff;\">Endpoint<\/span><\/code> (\u0443\u0441\u043b\u043e\u0432\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u0435\u0433\u043e &#171;\u0432\u0445\u043e\u0434\u043d\u044b\u043c&#187;, \u0442\u0430\u043a \u043a\u0430\u043a \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u043d\u0430 <code><span style=\"color: #0000ff;\">View<\/span><\/code>),\u00a0<\/span><\/li>\n<li><span style=\"font-weight: 400;\">\u00a0<code><span style=\"color: #0000ff;\">@Published var movies: [Movie]<\/span><\/code>\u00a0&#8212; \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0444\u0438\u043b\u044c\u043c\u043e\u0432 (\u0443\u0441\u043b\u043e\u0432\u043d\u043e &#171;\u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0435&#187;, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u0443\u0442\u0435\u043c \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0431\u0430\u0437\u044b \u0444\u0438\u043b\u044c\u043c\u043e\u0432\u00a0<a href=\"https:\/\/developers.themoviedb.org\/3\/getting-started\/introduction\">TMDb<\/a>) <\/span><\/li>\n<li><span style=\"font-weight: 400;\">\u00a0\u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e\u00a0<code><span style=\"color: #0000ff;\">@Published var moviesError: MovieError?<\/span><\/code>\u00a0&#8212; \u044d\u0442\u043e \u043e\u0448\u0438\u0431\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u044d\u0442\u0430\u043f\u0435\u00a0 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0431\u0430\u0437\u044b \u0444\u0438\u043b\u044c\u043c\u043e\u0432\u00a0<a href=\"https:\/\/developers.themoviedb.org\/3\/getting-started\/introduction\">TMDb<\/a>.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">\u041f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u043a\u043b\u0430\u0441\u0441\u0430 <code><span style=\"color: #0000ff;\">MoviesViewModel<\/span><\/code> \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u043e\u0442\u044f\u043d\u0443\u0442\u044c \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u043e\u0442 \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187;\u00a0<code><span style=\"color: #0000ff;\">$indexEndpoint <\/span><\/code>\u00a0\u0434\u043e \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187;\u00a0<code><span style=\"color: #0000ff;\">AnyPublisher&lt;[Movie],MovieError&gt;<\/span><\/code>, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b &#171;\u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u0441\u044f&#187; \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e &#171;\u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u0430&#187; <code><span style=\"color: #0000ff;\">sink<\/span><\/code> \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043b\u0438\u0431\u043e \u043c\u0430\u0441\u0441\u0438\u0432 \u0444\u0438\u043b\u044c\u043c\u043e\u0432\u00a0<code><span style=\"color: #0000ff;\">movies<\/span><\/code>, \u043b\u0438\u0431\u043e \u043e\u0448\u0438\u0431\u043a\u0443\u00a0<code><span style=\"color: #0000ff;\">moviesError<\/span><\/code>.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0412 \u043d\u0430\u0448\u0435\u043c <span style=\"color: #0000ff;\">MovieAPI<\/span> \u043c\u044b \u0443\u0436\u0435 \u0441\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u00a0 \u0444\u0443\u043d\u043a\u0446\u0438\u044e\u00a0<span style=\"color: #0000ff;\">fetchMoviesErr (from: Endpoint)<\/span>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187;\u00a0<span style=\"color: #0000ff;\">AnyPublisher&lt;[Movie], MovieError&gt;<\/span>, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u00a0<span style=\"color: #0000ff;\">Endpoint<\/span>, \u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187;\u00a0<span style=\"color: #0000ff;\">$indexEndpoint<\/span> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0434\u043b\u044f &#171;\u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e&#187; &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187;\u00a0<code><span style=\"color: #0000ff;\">$indexEndpoint<\/span><\/code> \u0422\u0418\u041f \u043e\u0448\u0438\u0431\u043a\u0438 \u0440\u0430\u0432\u043d\u044b\u0439 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u043e\u043c\u0443\u00a0<code><span style=\"color: #0000ff;\">MovieError<\/span><\/code>:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-22.04.54.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11809 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-22.04.54.png\" alt=\"\" width=\"864\" height=\"96\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-22.04.54.png 864w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-22.04.54-300x33.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-22.04.54-768x85.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-22.04.54-500x56.png 500w\" sizes=\"auto, (max-width: 864px) 100vw, 864px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439\u00a0<code><span style=\"color: #0000ff;\">fetchMoviesErr (from: Endpoint)<\/span><\/code> \u0438\u0437\u00a0\u043d\u0430\u0448\u0435\u0433\u043e\u00a0<code><span style=\"color: #0000ff;\">MovieAPI<\/span><\/code>. \u041a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u00a0<code><span style=\"color: #0000ff;\">flatMap<\/span><\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043d\u043e\u0432\u043e\u0433\u043e &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187; \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u043e\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187;:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-22.10.00.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11811 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-22.10.00.png\" alt=\"\" width=\"934\" height=\"254\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-22.10.00.png 934w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-22.10.00-300x82.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-22.10.00-768x209.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-22.10.00-500x136.png 500w\" sizes=\"auto, (max-width: 934px) 100vw, 934px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0414\u0430\u043b\u0435\u0435 \u043c\u044b &#171;\u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u0441\u044f&#187; \u043d\u0430 \u044d\u0442\u043e\u0433\u043e \u0432\u043d\u043e\u0432\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187; \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e &#171;\u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u0430&#187; <code><span style=\"color: #0000ff;\">sink<\/span><\/code> \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0435\u0433\u043e \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u044f\u00a0<code><span style=\"color: #0000ff;\">receiveCompletion<\/span><\/code> \u0438 <code><span style=\"color: #0000ff;\">receiveValue<\/span><\/code> \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0442 &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187; \u043b\u0438\u0431\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u00a0\u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0444\u0438\u043b\u044c\u043c\u043e\u0432 <code><span style=\"color: #0000ff;\">movies<\/span><\/code>, \u043b\u0438\u0431\u043e \u043e\u0448\u0438\u0431\u043a\u0438 <code><span style=\"color: #0000ff;\">movieError<\/span><\/code>:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-22.11.24.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11812 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-22.11.24.png\" alt=\"\" width=\"898\" height=\"490\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-22.11.24.png 898w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-22.11.24-300x164.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-22.11.24-768x419.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-22.11.24-500x273.png 500w\" sizes=\"auto, (max-width: 898px) 100vw, 898px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 &#171;\u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u0430&#187; \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u043f\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044e \u043a <code><span style=\"color: #0000ff;\">init()<\/span><\/code> \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code><span style=\"color: #0000ff;\">cancellableSet<\/span><\/code>. \u0418\u043d\u0430\u0447\u0435 \u043c\u044b \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u043c \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code><span style=\"color: #0000ff;\">movies<\/span><\/code> \u0438\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0443 <code><span style=\"color: #0000ff;\">movieError<\/span><\/code> \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f <code><span style=\"color: #0000ff;\">init()<\/span><\/code>:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-22.14.08.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11813 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-22.14.08.png\" alt=\"\" width=\"908\" height=\"526\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-22.14.08.png 908w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-22.14.08-300x174.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-22.14.08-768x445.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-22.14.08-500x290.png 500w\" sizes=\"auto, (max-width: 908px) 100vw, 908px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e<code> UI<\/code>. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0412 <code>SwiftUI<\/code> c\u043e\u0437\u0434\u0430\u0451\u043c \u043d\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 <code><span style=\"color: #0000ff;\">ContentViewErr<\/span><\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439\u00a0<code><span style=\"color: #0000ff;\">ContentView<\/span><\/code>, \u043d\u043e \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u0430\u044f\u00a0<code>View Model<\/code>\u00a0\u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u00a0<code><span style=\"color: #0000ff;\">@ObservedObject<\/span><\/code> \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439\u00a0<code><span style=\"color: #0000ff;\">var moviesViewModel<\/span><\/code>. \u042d\u0442\u043e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0432\u043d\u043e\u0432\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430\u00a0<code><span style=\"color: #0000ff;\">MoviesViewModelErr<\/span><\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 &#171;\u0443\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442&#187; \u043e\u0448\u0438\u0431\u043a\u0443 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0438 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0431\u0430\u0437\u044b\u00a0\u0444\u0438\u043b\u044c\u043c\u043e\u0432\u00a0<a href=\"https:\/\/developers.themoviedb.org\/3\/getting-started\/introduction\">TMDb<\/a>, \u0435\u0441\u043b\u0438 \u0442\u0430\u043a\u0430\u044f \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-18-at-17.37.29.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11703 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-18-at-17.37.29.png\" alt=\"\" width=\"1136\" height=\"1168\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-18-at-17.37.29.png 1136w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-18-at-17.37.29-292x300.png 292w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-18-at-17.37.29-768x790.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-18-at-17.37.29-996x1024.png 996w\" sizes=\"auto, (max-width: 1136px) 100vw, 1136px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043e\u0448\u0438\u0431\u043a\u0430, \u0442\u043e \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u044d\u043a\u0441\u0442\u0440\u0435\u043d\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 <code><span style=\"color: #0000ff;\">Alert<\/span><\/code>.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 <code>API<\/code> \u043a\u043b\u044e\u0447:<\/span><\/p>\n<pre class=\"line-numbers\"><code class=\"language-swift\">struct APIConstants {\r\n    \/\/\/ TMDB API key url: https:\/\/themoviedb.org\r\n    static let apiKey: String = \"API_KEY\" \r\n    \r\n   .  .  .  .  .  .  .  .  .  .  .  .  .\r\n}<\/code><\/pre>\n<p><span style=\"font-weight: 400;\">&#8230; \u0442\u043e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0442\u0430\u043a\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435:<br \/>\n<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-22-at-18.02.34.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11729 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-22-at-18.02.34.png\" alt=\"\" width=\"1074\" height=\"1200\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-22-at-18.02.34.png 1074w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-22-at-18.02.34-269x300.png 269w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-22-at-18.02.34-768x858.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-22-at-18.02.34-916x1024.png 916w\" sizes=\"auto, (max-width: 1074px) 100vw, 1074px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0415\u0441\u043b\u0438 \u0432 \u041c\u043e\u0434\u0435\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u043f\u043e\u043b\u0435:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-22-at-18.06.29.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11730 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-22-at-18.06.29.png\" alt=\"\" width=\"888\" height=\"544\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-22-at-18.06.29.png 888w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-22-at-18.06.29-300x184.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-22-at-18.06.29-768x470.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-22-at-18.06.29-490x300.png 490w\" sizes=\"auto, (max-width: 888px) 100vw, 888px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">&#8230; \u0442\u043e\u00a0 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0442\u0430\u043a\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-22-at-18.08.41.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11731 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-22-at-18.08.41.png\" alt=\"\" width=\"1158\" height=\"1324\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-22-at-18.08.41.png 1158w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-22-at-18.08.41-262x300.png 262w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-22-at-18.08.41-768x878.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-22-at-18.08.41-896x1024.png 896w\" sizes=\"auto, (max-width: 1158px) 100vw, 1158px\" \/><\/a><\/p>\n<h1>\u0421\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c JSON \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0444\u0438\u043b\u044c\u043c\u0430\u0445 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/h1>\n<p><span style=\"font-weight: 400;\">\u0418\u043d\u043e\u0433\u0434\u0430 \u0432\u0430\u0448\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0432 <code>JSON <\/code>\u0444\u0430\u0439\u043b\u0435 \u0432 <code>Bundle<\/code> \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-23-at-09.21.30.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11676 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-23-at-09.21.30.png\" alt=\"\" width=\"1580\" height=\"692\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-23-at-09.21.30.png 1580w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-23-at-09.21.30-300x131.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-23-at-09.21.30-768x336.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-23-at-09.21.30-1024x448.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-23-at-09.21.30-500x219.png 500w\" sizes=\"auto, (max-width: 1580px) 100vw, 1580px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c <code>View Model<\/code>, \u0430 <code>UI<\/code> \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u043d\u044b\u043c. \u042d\u0442\u0430 <code>View Model<\/code> \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439\u00a0 \u043a\u043b\u0430\u0441\u0441 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <code><span style=\"color: #0000ff;\">MoviesViewModelF<\/span><\/code>,\u00a0 \u0431\u0443\u043a\u0432\u0430 &#171;<code><span style=\"color: #0000ff;\">F<\/span><\/code>&#187; \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0444\u0438\u043b\u044c\u043c\u0430\u0445 \u0431\u0443\u0434\u0443\u0442 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 \u0432 <code><span style=\"color: #0000ff;\">Bundle.main<\/span><\/code> \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f :\u00a0<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-23-at-15.57.07.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11678 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-23-at-15.57.07.png\" alt=\"\" width=\"1244\" height=\"1292\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-23-at-15.57.07.png 1244w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-23-at-15.57.07-289x300.png 289w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-23-at-15.57.07-768x798.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-23-at-15.57.07-986x1024.png 986w\" sizes=\"auto, (max-width: 1244px) 100vw, 1244px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u041e\u043f\u044f\u0442\u044c \u0443 \u043d\u0430\u0441 \u0434\u0432\u0430 <code><span style=\"color: #0000ff;\">@Published<\/span><\/code> \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430:<\/span><\/p>\n<ol>\n<li><span style=\"font-weight: 400;\"><code><span style=\"color: #0000ff;\">\u00a0@Published var nameJSON: String<\/span><\/code> &#8212; \u044d\u0442\u043e \u0438\u043c\u044f <code>JSON<\/code> \u0444\u0430\u0439\u043b\u0430 (&#171;\u0443\u0441\u043b\u043e\u0432\u043d\u043e &#171;\u0432\u0445\u043e\u0434\u043d\u043e\u0435&#187; \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e),\u00a0<\/span><\/li>\n<li><span style=\"font-weight: 400;\"><code><span style=\"color: #0000ff;\">\u00a0@Published var movies: [Movie]<\/span><\/code>\u00a0&#8212; \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0444\u0438\u043b\u044c\u043c\u043e\u0432 (\u0443\u0441\u043b\u043e\u0432\u043d\u043e &#171;\u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0435&#187;, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u0443\u0442\u0435\u043c \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0431\u0430\u0437\u044b \u0444\u0438\u043b\u044c\u043c\u043e\u0432\u00a0<a href=\"https:\/\/developers.themoviedb.org\/3\/getting-started\/introduction\">TMDb<\/a>)<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">\u0418 \u043e\u043f\u044f\u0442\u044c \u043f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u043a\u043b\u0430\u0441\u0441\u0430 <code><span style=\"color: #0000ff;\">MoviesViewModelF<\/span><\/code>\u00a0\u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u043e\u0442\u044f\u043d\u0443\u0442\u044c \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u043e\u0442 \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187;\u00a0<code><span style=\"color: #0000ff;\">$nameJSON\u00a0<\/span><\/code>\u00a0\u0434\u043e \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187;\u00a0<code><span style=\"color: #0000ff;\">AnyPublisher&lt;[Movie], Never&gt;<\/span><\/code>, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c &#171;\u043f\u043e\u0434\u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f&#187; \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432 \u0444\u0438\u043b\u044c\u043c\u043e\u0432\u00a0<code><span style=\"color: #0000ff;\">[Movie]<\/span><\/code>. \u041e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0421\u0445\u0435\u043c\u0430 \u0442\u0430\u043a\u0430\u044f \u0436\u0435, \u043a\u0430\u043a \u0438 \u0432 \u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u0440\u0430\u0437, \u043d\u043e \u043d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u043c\u044b \u0432\u043e <code><span style=\"color: #0000ff;\">flatMap<\/span><\/code> \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u043c\u044f <code>JSON<\/code>-\u0444\u0430\u0439\u043b\u0430 <code><span style=\"color: #0000ff;\">nameJSON<\/span><\/code> \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0435\u0433\u043e \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 <code><span style=\"color: #0000ff;\">data<\/span><\/code> \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 \u0441 \u044d\u0442\u0438\u043c \u0438\u043c\u0435\u043d\u0435\u043c. \u0412 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u043c \u043c\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0442\u0435 \u0436\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0438 \u0442\u0443 \u0436\u0435 &#171;\u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443&#187; <code><span style=\"color: #0000ff;\">assign<\/span><\/code>.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0422\u0435\u043f\u0435\u0440\u044c \u0432<code> SwiftUI<\/code> \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443\u00a0<code><span style=\"color: #0000ff;\">ContentViewErr\u00a0<\/span><\/code>\u00a0c\u00a0<code><span style=\"color: #0000ff;\">MoviesViewModelF<\/span><\/code> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u00a0 <code>View Model<\/code>:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-22.19.41.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11814 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-22.19.41.png\" alt=\"\" width=\"942\" height=\"626\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-22.19.41.png 942w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-22.19.41-300x199.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-22.19.41-768x510.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-22.19.41-451x300.png 451w\" sizes=\"auto, (max-width: 942px) 100vw, 942px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0444\u0438\u043b\u044c\u043c\u043e\u0432, \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0438\u0445\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 <em>movies.json<\/em>:<\/span><br \/>\n<a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-24-at-07.22.50.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11682 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-24-at-07.22.50.png\" alt=\"\" width=\"2016\" height=\"1432\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-24-at-07.22.50.png 2016w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-24-at-07.22.50-300x213.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-24-at-07.22.50-768x546.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-24-at-07.22.50-1024x727.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2019-12-24-at-07.22.50-422x300.png 422w\" sizes=\"auto, (max-width: 2016px) 100vw, 2016px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u041d\u0430\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a \u043c\u044b \u0443\u043f\u0430\u043a\u0443\u0435\u043c \u0432\u0441\u0435 \u043d\u0430\u0448\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u043a\u0430\u0437\u0430 \u0444\u0438\u043b\u044c\u043c\u043e\u0432 \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445\u00a0<a href=\"https:\/\/developers.themoviedb.org\/3\/getting-started\/introduction\">TMDb<\/a> \u0432 <code><span style=\"color: #0000ff;\">TabView<\/span><\/code>:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-23.03.26.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11816 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-23.03.26.png\" alt=\"\" width=\"1582\" height=\"1432\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-23.03.26.png 1582w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-23.03.26-300x272.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-23.03.26-768x695.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-23.03.26-1024x927.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-28-at-23.03.26-331x300.png 331w\" sizes=\"auto, (max-width: 1582px) 100vw, 1582px\" \/><\/a><\/p>\n<h1>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435.<\/h1>\n<p><span style=\"font-weight: 400;\">\u041c\u044b \u0443\u0437\u043d\u0430\u043b\u0438, \u043a\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c <code>HTTP<\/code> \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>Combine<\/code>, \u0435\u0433\u043e <code><span style=\"color: #0000ff;\">URLSession<\/span><\/code> &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187; <code><span style=\"color: #0000ff;\">dataTaskPublisher<\/span><\/code> \u0438 <code><span style=\"color: #0000ff;\">Codable<\/span><\/code>. \u0415\u0441\u043b\u0438 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 <code>Generic<\/code> \u043a\u043e\u0434 \u0438\u0437 5 \u0441\u0442\u0440\u043e\u043a, \u0434\u043b\u044f\u00a0&#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187; <code><span style=\"color: #0000ff;\">AnyPublisher&lt;T, Never&gt;<\/span><\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 <code>JSON<\/code> \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438 \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u0442 \u0435\u0451 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 <code><span style=\"color: #0000ff;\">Codable<\/span><\/code> \u041c\u043e\u0434\u0435\u043b\u0438 <code><span style=\"color: #0000ff;\">T<\/span><\/code>\u00a0\u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438\u00a0\u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e\u00a0<code><span style=\"color: #0000ff;\">url<\/span><\/code>:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.30.08.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11761 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.30.08.png\" alt=\"\" width=\"1178\" height=\"302\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.30.08.png 1178w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.30.08-300x77.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.30.08-768x197.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.30.08-1024x263.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.30.08-500x128.png 500w\" sizes=\"auto, (max-width: 1178px) 100vw, 1178px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043e\u0447\u0435\u043d\u044c \u043b\u0435\u0433\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f, \u0435\u0441\u043b\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u043b\u044f <code><span style=\"color: #0000ff;\">url<\/span><\/code> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <code><span style=\"color: #0000ff;\">Endpoint<\/span><\/code>\u00a0\u0434\u043b\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0444\u0438\u043b\u044c\u043c\u043e\u0432\u00a0\u00a0<a href=\"https:\/\/developers.themoviedb.org\/3\/getting-started\/introduction\">TMDb<\/a> \u0438\u043b\u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0444\u0438\u043b\u044c\u043c\u0430 <code><span style=\"color: #0000ff;\">movieId<\/span><\/code>, \u0438 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u041c\u043e\u0434\u0435\u043b\u0438 &#8212; \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f \u0444\u0438\u043b\u044c\u043c\u043e\u0432 \u0438\u043b\u0438 \u0430\u043a\u0442\u0435\u0440\u0441\u043a\u0438\u0439 \u0441\u043e\u0441\u0442\u0430\u0432:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.25.41.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11760 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.25.41.png\" alt=\"\" width=\"1074\" height=\"946\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.25.41.png 1074w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.25.41-300x264.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.25.41-768x676.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.25.41-1024x902.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.25.41-341x300.png 341w\" sizes=\"auto, (max-width: 1074px) 100vw, 1074px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438, \u0442\u043e \u043a\u043e\u0434\u00a0\u0434\u043b\u044f\u00a0<code>Generic<\/code> &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187; \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u0441\u043b\u043e\u0436\u043d\u0438\u0442\u0441\u044f, \u043d\u043e \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u043e\u0434 \u0431\u0435\u0437 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e <code>callbacks<\/code>:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.23.00.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11759 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.23.00.png\" alt=\"\" width=\"1148\" height=\"574\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.23.00.png 1148w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.23.00-300x150.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.23.00-768x384.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.23.00-1024x512.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.23.00-500x250.png 500w\" sizes=\"auto, (max-width: 1148px) 100vw, 1148px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0422\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>Generic<\/code> \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187;\u00a0<code><span style=\"color: #0000ff;\">AnyPublisher&lt;T, Never&gt;<\/span><\/code>\u00a0 \u0434\u043b\u044f\u00a0<code>JSON\u00a0<\/code>\u0444\u0430\u0439\u043b\u0430, \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e\u0441\u044f \u0432 <code>Bundle<\/code> \u0444\u0430\u0439\u043b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.19.49.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11758 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.19.49.png\" alt=\"\" width=\"1144\" height=\"494\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.19.49.png 1144w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.19.49-300x130.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.19.49-768x332.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.19.49-1024x442.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.19.49-500x216.png 500w\" sizes=\"auto, (max-width: 1144px) 100vw, 1144px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f <code>HTTP<\/code> \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>Combine<\/code>, \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044f&#187; <code><span style=\"color: #0000ff;\">AnyPublisher&lt;UIImage?, Never&gt;<\/span>,<\/code> \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u00a0<code><span style=\"color: #0000ff;\">UIImage?<\/span><\/code> \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 <code>URL<\/code>. \u0417\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 <code><span style=\"color: #0000ff;\">ImageLoader<\/span><\/code> \u043a\u044d\u0448\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0439 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u0435\u0439&#187; \u043c\u043e\u0436\u043d\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e &#171;\u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c&#187; \u0432 <code><span style=\"color: #0000ff;\">ObservableObject<\/span><\/code> \u043a\u043b\u0430\u0441\u0441\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0432\u043e\u0438\u0445 <code><span style=\"color: #0000ff;\">@Published<\/span><\/code> \u0441\u0432\u043e\u0439\u0441\u0442\u0432<br \/>\n\u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442 \u0432\u0430\u0448\u0438\u043c <code>UI<\/code>, \u0441\u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>SwiftUI<\/code>. \u042d\u0442\u0438 \u043a\u043b\u0430\u0441\u0441\u044b \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 <code>View Model<\/code>, \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u043d\u0435\u043c \u0435\u0441\u0442\u044c \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0435 &#171;\u0432\u0445\u043e\u0434\u043d\u044b\u0435&#187; <code><span style=\"color: #0000ff;\">@Published<\/span><\/code> \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c <code>UI<\/code> \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c (\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u043c \u043f\u043e\u043b\u044f\u043c <code><span style=\"color: #0000ff;\">TextField<\/span><\/code>, <code><span style=\"color: #0000ff;\">Stepper<\/span><\/code>, <code><span style=\"color: #0000ff;\">Picker<\/span><\/code>, \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u0438 <code><span style=\"color: #0000ff;\">Toggle<\/span><\/code> \u0438 \u0442.\u0434.) \u0438 &#171;\u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435&#187; <code><span style=\"color: #0000ff;\">@Published<\/span><\/code> \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0435 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0438\u0437 \u043f\u0430\u0441\u0441\u0438\u0432\u043d\u044b\u0445 <code>UI<\/code> \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 (\u0442\u0435\u043a\u0441\u0442\u043e\u0432 <code><span style=\"color: #0000ff;\">Text<\/span><\/code>, \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 <code><span style=\"color: #0000ff;\">Image<\/span><\/code>, \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0444\u0438\u0433\u0443\u0440 <code><span style=\"color: #0000ff;\">Circle()<\/span><\/code>, <code><span style=\"color: #0000ff;\">Rectangle()<\/span><\/code> \u0438 \u0442.\u0434.<br \/>\n\u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 <code>View Model<\/code> \u0434\u043b\u044f &#171;\u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0439 \u0444\u0438\u043b\u044c\u043c\u043e\u0432 <code><span style=\"color: #0000ff;\">movies<\/span><\/code> \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u044d\u0442\u043e\u0439 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 <code><span style=\"color: #0000ff;\">indexEndpoint<\/span><\/code>:<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.13.04-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11798 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.13.04-1.png\" alt=\"\" width=\"1082\" height=\"868\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.13.04-1.png 1082w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.13.04-1-300x241.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.13.04-1-768x616.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.13.04-1-1024x821.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-27-at-15.13.04-1-374x300.png 374w\" sizes=\"auto, (max-width: 1082px) 100vw, 1082px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u0414\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0435 <code><span style=\"color: #0000ff;\">init ( )<\/span><\/code> \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>Combine<\/code> \u0441\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 &#171;\u0432\u0445\u043e\u0434\u043d\u044b\u043c&#187; \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u0438\u0437\u0434\u0430\u0442\u0435\u043b\u0435\u043c <code><span style=\"color: #0000ff;\">$indexEndpoint<\/span><\/code> \u0438 &#171;\u0432\u044b\u0445\u043e\u0434\u043d\u044b\u043c &#171;\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u0435\u043c&#187; <code><span style=\"color: #0000ff;\">movies<\/span><\/code>, \u0438 \u0432\u0430\u0448\u0435\u043c\u0443 <code>UI<\/code> \u0410\u0412\u0422\u041e\u041c\u0410\u0422\u0418\u0427\u0415\u0421\u041a\u0418 \u0431\u0443\u0434\u0435\u0442\u00a0 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0430 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438:<br \/>\n<\/span><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-26-at-18.30.09.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11747 size-full\" src=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-26-at-18.30.09.png\" alt=\"\" width=\"1718\" height=\"1420\" srcset=\"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-26-at-18.30.09.png 1718w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-26-at-18.30.09-300x248.png 300w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-26-at-18.30.09-768x635.png 768w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-26-at-18.30.09-1024x846.png 1024w, https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-01-26-at-18.30.09-363x300.png 363w\" sizes=\"auto, (max-width: 1718px) 100vw, 1718px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">\u042d\u0442\u043e\u0439 \u0438\u0434\u0435\u0435\u0439 \u043f\u0440\u043e\u043d\u0438\u0437\u0430\u043d\u043e \u0432\u0441\u0451 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0444\u0438\u043b\u044c\u043c\u043e\u0432\u00a0<a href=\"https:\/\/developers.themoviedb.org\/3\/getting-started\/introduction\">TMDb<\/a>, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0435 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435. \u041e\u043d\u0430 \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0439 \u0438 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445 \u043c\u044b \u043f\u043e\u043a\u0430\u0436\u0435\u043c, \u043a\u0430\u043a \u043e\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438 \u0441 \u0430\u0433\u0440\u0435\u0433\u0430\u0442\u043e\u0440\u0430\u043c\u0438 \u043d\u043e\u0432\u043e\u0441\u0442\u0435\u0439\u00a0<a href=\"https:\/\/bestkora.com\/IosDeveloper\/sovremennyj-kod-dlya-vypolneniya-http-zaprosov-v-swift-5-s-pomoshhyu-urlsession-combine-i-codable-chast-2\/\">NewsAPI.org<\/a> \u0438 <a href=\"https:\/\/bestkora.com\/IosDeveloper\/sovremennyj-kod-dlya-vypolneniya-http-zaprosov-v-swift-5-s-pomoshhyu-combine-i-primenenie-ih-v-swiftui-chast-3-novosti-hacker-news\/\">Hacker News<\/a>.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u041a\u043e\u0434 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 <a href=\"https:\/\/github.com\/BestKora\/MoviesJSON\">Github<\/a>.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0421\u0441\u044b\u043b\u043a\u0438:<\/span><\/p>\n<p class=\"post-full-title\"><strong><a href=\"https:\/\/www.vadimbulavin.com\/modern-networking-in-swift-5-with-urlsession-combine-framework-and-codable\/\">Modern Networking in Swift 5 with URLSession, Combine and Codable<\/a><\/strong><\/p>\n<h1><a href=\"https:\/\/oleb.net\/2020\/urlsession-publisher\/\">URLSession.DataTaskPublisher\u2019s failure type<\/a><\/h1>\n<p><a href=\"https:\/\/store.raywenderlich.com\/products\/combine-asynchronous-programming-with-swift\"><strong>Combine: Asynchronous Programming with Swift<\/strong><\/a><\/p>\n<p><a href=\"https:\/\/bestkora.com\/IosDeveloper\/swiftui-combine-vmeste-luchshe-pochemu-swiftui-i-combine-pomogut-vam-sozdavat-bolee-luchshie-prilozheniya\/\"><span style=\"font-weight: 400;\"><strong>&#171;SwiftUI &amp; Combine: \u041b\u0443\u0447\u0448\u0435 \u0432\u043c\u0435\u0441\u0442\u0435&#187;<\/strong><\/span><\/a><\/p>\n<p><strong><a href=\"https:\/\/developer.apple.com\/videos\/play\/wwdc2019\/722\/\">Introducing Combine &#8212; WWDC 2019 &#8212; Videos &#8212; Apple Developer. session 722 <\/a><\/strong><\/p>\n<p><strong><a href=\"https:\/\/drive.google.com\/file\/d\/1O4QARAjjFEjjH9_EiDIuUqoalq0rL8PS\/view?usp=sharing\">(\u043a\u043e\u043d\u0441\u043f\u0435\u043a\u0442 \u0441\u0435\u0441\u0441\u0438\u0438 722 &#171;\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 Combine&#187; \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435)<\/a><\/strong><\/p>\n<p><a href=\"https:\/\/developer.apple.com\/videos\/play\/wwdc2019\/721\"><strong>Combine in Practice &#8212; WWDC 2019 &#8212; Videos &#8212; Apple Developer. session 721<\/strong><\/a><\/p>\n<p><strong><a href=\"https:\/\/docs.google.com\/document\/d\/1Klsc_7OLx_NWQ-vj6WbdyrmJG1DmoqAAoxLoVB2lbaA\/edit?usp=sharing\">(\u043a\u043e\u043d\u0441\u043f\u0435\u043a\u0442 \u0441\u0435\u0441\u0441\u0438\u0438 721 &#171;\u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 Combine&#187; \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435)<\/a><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 &#8212; \u044d\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0432\u0430\u0436\u043d\u044b\u0445 \u043d\u0430\u0432\u044b\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0440\u0438 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0438 iOS. \u0412 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u043d\u043d\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 Swift ( \u0434\u043e \u0432\u0435\u0440\u0441\u0438\u0438 5) \u0432\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043b\u0438 \u0432\u044b \u044d\u0442\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b &#171;\u0441 \u043d\u0443\u043b\u044f&#187; \u0438\u043b\u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0433\u043e &hellip; <a href=\"https:\/\/bestkora.com\/IosDeveloper\/modern-networking-in-swift-5-with-urlsession-combine-and-codable\/\">\u0427\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u0435\u0435 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[60,55,54],"tags":[],"class_list":["post-11605","post","type-post","status-publish","format-standard","hentry","category-combine","category-ios-13","category-swiftui"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.8 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 Combine \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0445 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 View Model \u0432 SwiftUI.\" \/>\n\t<meta name=\"robots\" content=\"max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n\t<meta name=\"author\" content=\"tatiana.kornilova@gmail.com\"\/>\n\t<meta name=\"keywords\" content=\"combine,apple,publisher,subscriber,swift 5,http request,cancellable,anycancellable,receivecompletion,receivevalue,future,promise,datataskpublisher,assing(to:,on:),sink,swiftui,observableobject,view model,erasetoanypublisher,objectwillchange,identifiable,@observedobject,\u00a0tmdb\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/bestkora.com\/IosDeveloper\/modern-networking-in-swift-5-with-urlsession-combine-and-codable\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.8\" \/>\n\t\t<meta property=\"og:locale\" content=\"ru_RU\" \/>\n\t\t<meta property=\"og:site_name\" content=\"\u041e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0439 \u043a\u0443\u0440\u0441 \u043f\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 iOS+Swift \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. | \u0420\u0443\u0441\u0441\u043a\u0438\u0439 \u043d\u0435\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0441\u043f\u0435\u043a\u0442 \u043b\u0435\u043a\u0446\u0438\u0439 \u0421\u0442\u044d\u043d\u0444\u043e\u0440\u0434\u0441\u043a\u043e\u0433\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0438\u0442\u0435\u0442\u0430 &quot; \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 iOS \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439&quot; 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 , 2023,  2024,  2025  \u0438 2026 \u0433\u0433., \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0430\u0435\u043c\u044b\u0439 \u0440\u0435\u0448\u0435\u043d\u0438\u044f\u043c\u0438 \u0437\u0430\u0434\u0430\u043d\u0438\u0439 \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f\u043c\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u0441 \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u0435\u0439 \u043a\u0443\u0440\u0441\u043e\u0432 \u043a \u043d\u043e\u0432\u044b\u043c \u0432\u0435\u0440\u0441\u0438\u044f\u043c Swift, Objective-C \u0438 iOS.\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 Swift 5 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Combine \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0435\u0433\u043e \u0432 SwiftUI. \u0427\u0430\u0441\u0442\u044c 1. | \u041e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0439 \u043a\u0443\u0440\u0441 \u043f\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 iOS+Swift \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 Combine \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0445 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 View Model \u0432 SwiftUI.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/bestkora.com\/IosDeveloper\/modern-networking-in-swift-5-with-urlsession-combine-and-codable\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-12-02T19:04:02+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-02-29T12:49:10+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 Swift 5 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Combine \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0435\u0433\u043e \u0432 SwiftUI. \u0427\u0430\u0441\u0442\u044c 1. | \u041e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0439 \u043a\u0443\u0440\u0441 \u043f\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 iOS+Swift \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.\" \/>\n\t\t<meta name=\"twitter:description\" content=\"\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 Combine \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0445 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 View Model \u0432 SwiftUI.\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/bestkora.com\\\/IosDeveloper\\\/modern-networking-in-swift-5-with-urlsession-combine-and-codable\\\/#article\",\"name\":\"\\u0421\\u043e\\u0432\\u0440\\u0435\\u043c\\u0435\\u043d\\u043d\\u044b\\u0439 \\u043a\\u043e\\u0434 \\u0434\\u043b\\u044f \\u0432\\u044b\\u043f\\u043e\\u043b\\u043d\\u0435\\u043d\\u0438\\u044f HTTP \\u0437\\u0430\\u043f\\u0440\\u043e\\u0441\\u043e\\u0432 \\u0432 Swift 5 \\u0441 \\u043f\\u043e\\u043c\\u043e\\u0449\\u044c\\u044e Combine \\u0438 \\u043f\\u0440\\u0438\\u043c\\u0435\\u043d\\u0435\\u043d\\u0438\\u0435 \\u0435\\u0433\\u043e \\u0432 SwiftUI. \\u0427\\u0430\\u0441\\u0442\\u044c 1. | \\u041e\\u0431\\u0443\\u0447\\u0430\\u044e\\u0449\\u0438\\u0439 \\u043a\\u0443\\u0440\\u0441 \\u043f\\u043e \\u0440\\u0430\\u0437\\u0440\\u0430\\u0431\\u043e\\u0442\\u043a\\u0435 iOS+Swift \\u043f\\u0440\\u0438\\u043b\\u043e\\u0436\\u0435\\u043d\\u0438\\u0439.\",\"headline\":\"\\u0421\\u043e\\u0432\\u0440\\u0435\\u043c\\u0435\\u043d\\u043d\\u044b\\u0439 \\u043a\\u043e\\u0434 \\u0434\\u043b\\u044f \\u0432\\u044b\\u043f\\u043e\\u043b\\u043d\\u0435\\u043d\\u0438\\u044f HTTP \\u0437\\u0430\\u043f\\u0440\\u043e\\u0441\\u043e\\u0432 \\u0432 Swift 5 \\u0441 \\u043f\\u043e\\u043c\\u043e\\u0449\\u044c\\u044e Combine \\u0438 \\u043f\\u0440\\u0438\\u043c\\u0435\\u043d\\u0435\\u043d\\u0438\\u0435 \\u0435\\u0433\\u043e \\u0432 SwiftUI. \\u0427\\u0430\\u0441\\u0442\\u044c 1. \\u0411\\u0430\\u0437\\u0430 \\u0434\\u0430\\u043d\\u043d\\u044b\\u0445 \\u0444\\u0438\\u043b\\u044c\\u043c\\u043e\\u0432.\",\"author\":{\"@id\":\"https:\\\/\\\/bestkora.com\\\/IosDeveloper\\\/author\\\/tatiana-lornilovagmail-com\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/bestkora.com\\\/IosDeveloper\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/bestkora.com\\\/IosDeveloper\\\/wp-content\\\/uploads\\\/2019\\\/12\\\/Screenshot-2020-02-29-at-15.47.28.png\",\"@id\":\"https:\\\/\\\/bestkora.com\\\/IosDeveloper\\\/modern-networking-in-swift-5-with-urlsession-combine-and-codable\\\/#articleImage\",\"width\":1400,\"height\":1388},\"datePublished\":\"2019-12-02T19:04:02+00:00\",\"dateModified\":\"2020-02-29T12:49:10+00:00\",\"inLanguage\":\"ru-RU\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/bestkora.com\\\/IosDeveloper\\\/modern-networking-in-swift-5-with-urlsession-combine-and-codable\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/bestkora.com\\\/IosDeveloper\\\/modern-networking-in-swift-5-with-urlsession-combine-and-codable\\\/#webpage\"},\"articleSection\":\"Combine, iOS 13, SwiftUI\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/bestkora.com\\\/IosDeveloper\\\/modern-networking-in-swift-5-with-urlsession-combine-and-codable\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/bestkora.com\\\/IosDeveloper#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/bestkora.com\\\/IosDeveloper\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/bestkora.com\\\/IosDeveloper\\\/category\\\/swiftui\\\/#listItem\",\"name\":\"SwiftUI\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/bestkora.com\\\/IosDeveloper\\\/category\\\/swiftui\\\/#listItem\",\"position\":2,\"name\":\"SwiftUI\",\"item\":\"https:\\\/\\\/bestkora.com\\\/IosDeveloper\\\/category\\\/swiftui\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/bestkora.com\\\/IosDeveloper\\\/modern-networking-in-swift-5-with-urlsession-combine-and-codable\\\/#listItem\",\"name\":\"\\u0421\\u043e\\u0432\\u0440\\u0435\\u043c\\u0435\\u043d\\u043d\\u044b\\u0439 \\u043a\\u043e\\u0434 \\u0434\\u043b\\u044f \\u0432\\u044b\\u043f\\u043e\\u043b\\u043d\\u0435\\u043d\\u0438\\u044f HTTP \\u0437\\u0430\\u043f\\u0440\\u043e\\u0441\\u043e\\u0432 \\u0432 Swift 5 \\u0441 \\u043f\\u043e\\u043c\\u043e\\u0449\\u044c\\u044e Combine \\u0438 \\u043f\\u0440\\u0438\\u043c\\u0435\\u043d\\u0435\\u043d\\u0438\\u0435 \\u0435\\u0433\\u043e \\u0432 SwiftUI. \\u0427\\u0430\\u0441\\u0442\\u044c 1. \\u0411\\u0430\\u0437\\u0430 \\u0434\\u0430\\u043d\\u043d\\u044b\\u0445 \\u0444\\u0438\\u043b\\u044c\\u043c\\u043e\\u0432.\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/bestkora.com\\\/IosDeveloper#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/bestkora.com\\\/IosDeveloper\\\/modern-networking-in-swift-5-with-urlsession-combine-and-codable\\\/#listItem\",\"position\":3,\"name\":\"\\u0421\\u043e\\u0432\\u0440\\u0435\\u043c\\u0435\\u043d\\u043d\\u044b\\u0439 \\u043a\\u043e\\u0434 \\u0434\\u043b\\u044f \\u0432\\u044b\\u043f\\u043e\\u043b\\u043d\\u0435\\u043d\\u0438\\u044f HTTP \\u0437\\u0430\\u043f\\u0440\\u043e\\u0441\\u043e\\u0432 \\u0432 Swift 5 \\u0441 \\u043f\\u043e\\u043c\\u043e\\u0449\\u044c\\u044e Combine \\u0438 \\u043f\\u0440\\u0438\\u043c\\u0435\\u043d\\u0435\\u043d\\u0438\\u0435 \\u0435\\u0433\\u043e \\u0432 SwiftUI. \\u0427\\u0430\\u0441\\u0442\\u044c 1. \\u0411\\u0430\\u0437\\u0430 \\u0434\\u0430\\u043d\\u043d\\u044b\\u0445 \\u0444\\u0438\\u043b\\u044c\\u043c\\u043e\\u0432.\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/bestkora.com\\\/IosDeveloper\\\/category\\\/swiftui\\\/#listItem\",\"name\":\"SwiftUI\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/bestkora.com\\\/IosDeveloper\\\/#person\",\"name\":\"tatiana.kornilova@gmail.com\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/bestkora.com\\\/IosDeveloper\\\/modern-networking-in-swift-5-with-urlsession-combine-and-codable\\\/#personImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/33ccc19059014d8a7849c3621afa2b66a5f3e50ac7291c91c30ff35df5747628?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"tatiana.kornilova@gmail.com\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/bestkora.com\\\/IosDeveloper\\\/author\\\/tatiana-lornilovagmail-com\\\/#author\",\"url\":\"https:\\\/\\\/bestkora.com\\\/IosDeveloper\\\/author\\\/tatiana-lornilovagmail-com\\\/\",\"name\":\"tatiana.kornilova@gmail.com\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/bestkora.com\\\/IosDeveloper\\\/modern-networking-in-swift-5-with-urlsession-combine-and-codable\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/33ccc19059014d8a7849c3621afa2b66a5f3e50ac7291c91c30ff35df5747628?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"tatiana.kornilova@gmail.com\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/bestkora.com\\\/IosDeveloper\\\/modern-networking-in-swift-5-with-urlsession-combine-and-codable\\\/#webpage\",\"url\":\"https:\\\/\\\/bestkora.com\\\/IosDeveloper\\\/modern-networking-in-swift-5-with-urlsession-combine-and-codable\\\/\",\"name\":\"\\u0421\\u043e\\u0432\\u0440\\u0435\\u043c\\u0435\\u043d\\u043d\\u044b\\u0439 \\u043a\\u043e\\u0434 \\u0434\\u043b\\u044f \\u0432\\u044b\\u043f\\u043e\\u043b\\u043d\\u0435\\u043d\\u0438\\u044f HTTP \\u0437\\u0430\\u043f\\u0440\\u043e\\u0441\\u043e\\u0432 \\u0432 Swift 5 \\u0441 \\u043f\\u043e\\u043c\\u043e\\u0449\\u044c\\u044e Combine \\u0438 \\u043f\\u0440\\u0438\\u043c\\u0435\\u043d\\u0435\\u043d\\u0438\\u0435 \\u0435\\u0433\\u043e \\u0432 SwiftUI. \\u0427\\u0430\\u0441\\u0442\\u044c 1. | \\u041e\\u0431\\u0443\\u0447\\u0430\\u044e\\u0449\\u0438\\u0439 \\u043a\\u0443\\u0440\\u0441 \\u043f\\u043e \\u0440\\u0430\\u0437\\u0440\\u0430\\u0431\\u043e\\u0442\\u043a\\u0435 iOS+Swift \\u043f\\u0440\\u0438\\u043b\\u043e\\u0436\\u0435\\u043d\\u0438\\u0439.\",\"description\":\"\\u041f\\u0440\\u0438\\u043c\\u0435\\u043d\\u0435\\u043d\\u0438\\u0435 Combine \\u0434\\u043b\\u044f \\u0444\\u043e\\u0440\\u043c\\u0438\\u0440\\u043e\\u0432\\u0430\\u043d\\u0438\\u044f HTTP \\u0437\\u0430\\u043f\\u0440\\u043e\\u0441\\u043e\\u0432 \\u043a \\u0440\\u0430\\u0437\\u043b\\u0438\\u0447\\u043d\\u044b\\u043c \\u0441\\u0435\\u0440\\u0432\\u0438\\u0441\\u0430\\u043c \\u0438 \\u0438\\u0441\\u043f\\u043e\\u043b\\u044c\\u0437\\u043e\\u0432\\u0430\\u043d\\u0438\\u0435 \\u0438\\u0445 \\u0432 \\u043a\\u0430\\u0447\\u0435\\u0441\\u0442\\u0432\\u0435 View Model \\u0432 SwiftUI.\",\"inLanguage\":\"ru-RU\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/bestkora.com\\\/IosDeveloper\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/bestkora.com\\\/IosDeveloper\\\/modern-networking-in-swift-5-with-urlsession-combine-and-codable\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/bestkora.com\\\/IosDeveloper\\\/author\\\/tatiana-lornilovagmail-com\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/bestkora.com\\\/IosDeveloper\\\/author\\\/tatiana-lornilovagmail-com\\\/#author\"},\"datePublished\":\"2019-12-02T19:04:02+00:00\",\"dateModified\":\"2020-02-29T12:49:10+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/bestkora.com\\\/IosDeveloper\\\/#website\",\"url\":\"https:\\\/\\\/bestkora.com\\\/IosDeveloper\\\/\",\"name\":\"\\u041e\\u0431\\u0443\\u0447\\u0430\\u044e\\u0449\\u0438\\u0439 \\u043a\\u0443\\u0440\\u0441 \\u043f\\u043e \\u0440\\u0430\\u0437\\u0440\\u0430\\u0431\\u043e\\u0442\\u043a\\u0435 iOS+Swift \\u043f\\u0440\\u0438\\u043b\\u043e\\u0436\\u0435\\u043d\\u0438\\u0439.\",\"description\":\"\\u0420\\u0443\\u0441\\u0441\\u043a\\u0438\\u0439 \\u043d\\u0435\\u0430\\u0432\\u0442\\u043e\\u0440\\u0438\\u0437\\u043e\\u0432\\u0430\\u043d\\u043d\\u044b\\u0439 \\u043a\\u043e\\u043d\\u0441\\u043f\\u0435\\u043a\\u0442 \\u043b\\u0435\\u043a\\u0446\\u0438\\u0439 \\u0421\\u0442\\u044d\\u043d\\u0444\\u043e\\u0440\\u0434\\u0441\\u043a\\u043e\\u0433\\u043e \\u0443\\u043d\\u0438\\u0432\\u0435\\u0440\\u0441\\u0438\\u0442\\u0435\\u0442\\u0430 \\\" \\u0420\\u0430\\u0437\\u0440\\u0430\\u0431\\u043e\\u0442\\u043a\\u0430 iOS \\u043f\\u0440\\u0438\\u043b\\u043e\\u0436\\u0435\\u043d\\u0438\\u0439\\\" 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 , 2023,  2024,  2025  \\u0438 2026 \\u0433\\u0433., \\u0441\\u043e\\u043f\\u0440\\u043e\\u0432\\u043e\\u0436\\u0434\\u0430\\u0435\\u043c\\u044b\\u0439 \\u0440\\u0435\\u0448\\u0435\\u043d\\u0438\\u044f\\u043c\\u0438 \\u0437\\u0430\\u0434\\u0430\\u043d\\u0438\\u0439 \\u0438 \\u0434\\u043e\\u043f\\u043e\\u043b\\u043d\\u0435\\u043d\\u0438\\u044f\\u043c\\u0438, \\u0441\\u0432\\u044f\\u0437\\u0430\\u043d\\u043d\\u044b\\u043c\\u0438 \\u0441 \\u0430\\u0434\\u0430\\u043f\\u0442\\u0430\\u0446\\u0438\\u0435\\u0439 \\u043a\\u0443\\u0440\\u0441\\u043e\\u0432 \\u043a \\u043d\\u043e\\u0432\\u044b\\u043c \\u0432\\u0435\\u0440\\u0441\\u0438\\u044f\\u043c Swift, Objective-C \\u0438 iOS.\",\"inLanguage\":\"ru-RU\",\"publisher\":{\"@id\":\"https:\\\/\\\/bestkora.com\\\/IosDeveloper\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 Swift 5 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Combine \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0435\u0433\u043e \u0432 SwiftUI. \u0427\u0430\u0441\u0442\u044c 1. | \u041e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0439 \u043a\u0443\u0440\u0441 \u043f\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 iOS+Swift \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.","description":"\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 Combine \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0445 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 View Model \u0432 SwiftUI.","canonical_url":"https:\/\/bestkora.com\/IosDeveloper\/modern-networking-in-swift-5-with-urlsession-combine-and-codable\/","robots":"max-snippet:-1, max-image-preview:large, max-video-preview:-1","keywords":"combine,apple,publisher,subscriber,swift 5,http request,cancellable,anycancellable,receivecompletion,receivevalue,future,promise,datataskpublisher,assing(to:,on:),sink,swiftui,observableobject,view model,erasetoanypublisher,objectwillchange,identifiable,@observedobject,\u00a0tmdb","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/bestkora.com\/IosDeveloper\/modern-networking-in-swift-5-with-urlsession-combine-and-codable\/#article","name":"\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 Swift 5 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Combine \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0435\u0433\u043e \u0432 SwiftUI. \u0427\u0430\u0441\u0442\u044c 1. | \u041e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0439 \u043a\u0443\u0440\u0441 \u043f\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 iOS+Swift \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.","headline":"\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 Swift 5 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Combine \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0435\u0433\u043e \u0432 SwiftUI. \u0427\u0430\u0441\u0442\u044c 1. \u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0444\u0438\u043b\u044c\u043c\u043e\u0432.","author":{"@id":"https:\/\/bestkora.com\/IosDeveloper\/author\/tatiana-lornilovagmail-com\/#author"},"publisher":{"@id":"https:\/\/bestkora.com\/IosDeveloper\/#person"},"image":{"@type":"ImageObject","url":"https:\/\/bestkora.com\/IosDeveloper\/wp-content\/uploads\/2019\/12\/Screenshot-2020-02-29-at-15.47.28.png","@id":"https:\/\/bestkora.com\/IosDeveloper\/modern-networking-in-swift-5-with-urlsession-combine-and-codable\/#articleImage","width":1400,"height":1388},"datePublished":"2019-12-02T19:04:02+00:00","dateModified":"2020-02-29T12:49:10+00:00","inLanguage":"ru-RU","mainEntityOfPage":{"@id":"https:\/\/bestkora.com\/IosDeveloper\/modern-networking-in-swift-5-with-urlsession-combine-and-codable\/#webpage"},"isPartOf":{"@id":"https:\/\/bestkora.com\/IosDeveloper\/modern-networking-in-swift-5-with-urlsession-combine-and-codable\/#webpage"},"articleSection":"Combine, iOS 13, SwiftUI"},{"@type":"BreadcrumbList","@id":"https:\/\/bestkora.com\/IosDeveloper\/modern-networking-in-swift-5-with-urlsession-combine-and-codable\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/bestkora.com\/IosDeveloper#listItem","position":1,"name":"Home","item":"https:\/\/bestkora.com\/IosDeveloper","nextItem":{"@type":"ListItem","@id":"https:\/\/bestkora.com\/IosDeveloper\/category\/swiftui\/#listItem","name":"SwiftUI"}},{"@type":"ListItem","@id":"https:\/\/bestkora.com\/IosDeveloper\/category\/swiftui\/#listItem","position":2,"name":"SwiftUI","item":"https:\/\/bestkora.com\/IosDeveloper\/category\/swiftui\/","nextItem":{"@type":"ListItem","@id":"https:\/\/bestkora.com\/IosDeveloper\/modern-networking-in-swift-5-with-urlsession-combine-and-codable\/#listItem","name":"\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 Swift 5 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Combine \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0435\u0433\u043e \u0432 SwiftUI. \u0427\u0430\u0441\u0442\u044c 1. \u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0444\u0438\u043b\u044c\u043c\u043e\u0432."},"previousItem":{"@type":"ListItem","@id":"https:\/\/bestkora.com\/IosDeveloper#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/bestkora.com\/IosDeveloper\/modern-networking-in-swift-5-with-urlsession-combine-and-codable\/#listItem","position":3,"name":"\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 Swift 5 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Combine \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0435\u0433\u043e \u0432 SwiftUI. \u0427\u0430\u0441\u0442\u044c 1. \u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0444\u0438\u043b\u044c\u043c\u043e\u0432.","previousItem":{"@type":"ListItem","@id":"https:\/\/bestkora.com\/IosDeveloper\/category\/swiftui\/#listItem","name":"SwiftUI"}}]},{"@type":"Person","@id":"https:\/\/bestkora.com\/IosDeveloper\/#person","name":"tatiana.kornilova@gmail.com","image":{"@type":"ImageObject","@id":"https:\/\/bestkora.com\/IosDeveloper\/modern-networking-in-swift-5-with-urlsession-combine-and-codable\/#personImage","url":"https:\/\/secure.gravatar.com\/avatar\/33ccc19059014d8a7849c3621afa2b66a5f3e50ac7291c91c30ff35df5747628?s=96&d=mm&r=g","width":96,"height":96,"caption":"tatiana.kornilova@gmail.com"}},{"@type":"Person","@id":"https:\/\/bestkora.com\/IosDeveloper\/author\/tatiana-lornilovagmail-com\/#author","url":"https:\/\/bestkora.com\/IosDeveloper\/author\/tatiana-lornilovagmail-com\/","name":"tatiana.kornilova@gmail.com","image":{"@type":"ImageObject","@id":"https:\/\/bestkora.com\/IosDeveloper\/modern-networking-in-swift-5-with-urlsession-combine-and-codable\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/33ccc19059014d8a7849c3621afa2b66a5f3e50ac7291c91c30ff35df5747628?s=96&d=mm&r=g","width":96,"height":96,"caption":"tatiana.kornilova@gmail.com"}},{"@type":"WebPage","@id":"https:\/\/bestkora.com\/IosDeveloper\/modern-networking-in-swift-5-with-urlsession-combine-and-codable\/#webpage","url":"https:\/\/bestkora.com\/IosDeveloper\/modern-networking-in-swift-5-with-urlsession-combine-and-codable\/","name":"\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 Swift 5 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Combine \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0435\u0433\u043e \u0432 SwiftUI. \u0427\u0430\u0441\u0442\u044c 1. | \u041e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0439 \u043a\u0443\u0440\u0441 \u043f\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 iOS+Swift \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.","description":"\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 Combine \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0445 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 View Model \u0432 SwiftUI.","inLanguage":"ru-RU","isPartOf":{"@id":"https:\/\/bestkora.com\/IosDeveloper\/#website"},"breadcrumb":{"@id":"https:\/\/bestkora.com\/IosDeveloper\/modern-networking-in-swift-5-with-urlsession-combine-and-codable\/#breadcrumblist"},"author":{"@id":"https:\/\/bestkora.com\/IosDeveloper\/author\/tatiana-lornilovagmail-com\/#author"},"creator":{"@id":"https:\/\/bestkora.com\/IosDeveloper\/author\/tatiana-lornilovagmail-com\/#author"},"datePublished":"2019-12-02T19:04:02+00:00","dateModified":"2020-02-29T12:49:10+00:00"},{"@type":"WebSite","@id":"https:\/\/bestkora.com\/IosDeveloper\/#website","url":"https:\/\/bestkora.com\/IosDeveloper\/","name":"\u041e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0439 \u043a\u0443\u0440\u0441 \u043f\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 iOS+Swift \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.","description":"\u0420\u0443\u0441\u0441\u043a\u0438\u0439 \u043d\u0435\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0441\u043f\u0435\u043a\u0442 \u043b\u0435\u043a\u0446\u0438\u0439 \u0421\u0442\u044d\u043d\u0444\u043e\u0440\u0434\u0441\u043a\u043e\u0433\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0438\u0442\u0435\u0442\u0430 \" \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 iOS \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439\" 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 , 2023,  2024,  2025  \u0438 2026 \u0433\u0433., \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0430\u0435\u043c\u044b\u0439 \u0440\u0435\u0448\u0435\u043d\u0438\u044f\u043c\u0438 \u0437\u0430\u0434\u0430\u043d\u0438\u0439 \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f\u043c\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u0441 \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u0435\u0439 \u043a\u0443\u0440\u0441\u043e\u0432 \u043a \u043d\u043e\u0432\u044b\u043c \u0432\u0435\u0440\u0441\u0438\u044f\u043c Swift, Objective-C \u0438 iOS.","inLanguage":"ru-RU","publisher":{"@id":"https:\/\/bestkora.com\/IosDeveloper\/#person"}}]},"og:locale":"ru_RU","og:site_name":"\u041e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0439 \u043a\u0443\u0440\u0441 \u043f\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 iOS+Swift \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. | \u0420\u0443\u0441\u0441\u043a\u0438\u0439 \u043d\u0435\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0441\u043f\u0435\u043a\u0442 \u043b\u0435\u043a\u0446\u0438\u0439 \u0421\u0442\u044d\u043d\u0444\u043e\u0440\u0434\u0441\u043a\u043e\u0433\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0438\u0442\u0435\u0442\u0430 &quot; \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 iOS \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439&quot; 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 , 2023,  2024,  2025  \u0438 2026 \u0433\u0433., \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0430\u0435\u043c\u044b\u0439 \u0440\u0435\u0448\u0435\u043d\u0438\u044f\u043c\u0438 \u0437\u0430\u0434\u0430\u043d\u0438\u0439 \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f\u043c\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u0441 \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u0435\u0439 \u043a\u0443\u0440\u0441\u043e\u0432 \u043a \u043d\u043e\u0432\u044b\u043c \u0432\u0435\u0440\u0441\u0438\u044f\u043c Swift, Objective-C \u0438 iOS.","og:type":"article","og:title":"\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 Swift 5 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Combine \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0435\u0433\u043e \u0432 SwiftUI. \u0427\u0430\u0441\u0442\u044c 1. | \u041e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0439 \u043a\u0443\u0440\u0441 \u043f\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 iOS+Swift \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.","og:description":"\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 Combine \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0445 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 View Model \u0432 SwiftUI.","og:url":"https:\/\/bestkora.com\/IosDeveloper\/modern-networking-in-swift-5-with-urlsession-combine-and-codable\/","article:published_time":"2019-12-02T19:04:02+00:00","article:modified_time":"2020-02-29T12:49:10+00:00","twitter:card":"summary","twitter:title":"\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 Swift 5 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Combine \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0435\u0433\u043e \u0432 SwiftUI. \u0427\u0430\u0441\u0442\u044c 1. | \u041e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0439 \u043a\u0443\u0440\u0441 \u043f\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 iOS+Swift \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.","twitter:description":"\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 Combine \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0445 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 View Model \u0432 SwiftUI."},"aioseo_meta_data":{"post_id":"11605","title":"\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 Swift 5 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Combine \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0435\u0433\u043e \u0432 SwiftUI. \u0427\u0430\u0441\u0442\u044c 1. | #site_title","description":"\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 Combine \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0445 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u00a0View Model \u0432 SwiftUI.","keywords":[{"label":"Combine","value":"Combine"},{"label":"Apple","value":"Apple"},{"label":"Publisher","value":"Publisher"},{"label":"Subscriber","value":"Subscriber"},{"label":"Swift 5","value":"Swift 5"},{"label":"HTTP request","value":"HTTP request"},{"label":"Cancellable","value":"Cancellable"},{"label":"AnyCancellable","value":"AnyCancellable"},{"label":"receiveCompletion","value":"receiveCompletion"},{"label":"receiveValue","value":"receiveValue"},{"label":"Future","value":"Future"},{"label":"Promise","value":"Promise"},{"label":"dataTaskPublisher","value":"dataTaskPublisher"},{"label":"assing(to:","value":"assing(to:"},{"label":"on:)","value":"on:)"},{"label":"sink","value":"sink"},{"label":"SwiftUI","value":"SwiftUI"},{"label":"ObservableObject","value":"ObservableObject"},{"label":"View Model","value":"View Model"},{"label":"eraseToAnyPublisher","value":"eraseToAnyPublisher"},{"label":"objectWillChange","value":"objectWillChange"},{"label":"Identifiable","value":"Identifiable"},{"label":"View Model","value":"View Model"},{"label":"@ObservedObject","value":"@ObservedObject"},{"label":"\u00a0TMDb","value":"\u00a0TMDb"}],"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2020-12-21 06:31:40","updated":"2026-02-22 20:04:42","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/bestkora.com\/IosDeveloper\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/bestkora.com\/IosDeveloper\/category\/swiftui\/\" title=\"SwiftUI\">SwiftUI<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 Swift 5 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Combine \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0435\u0433\u043e \u0432 SwiftUI. \u0427\u0430\u0441\u0442\u044c 1. \u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0444\u0438\u043b\u044c\u043c\u043e\u0432.\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/bestkora.com\/IosDeveloper"},{"label":"SwiftUI","link":"https:\/\/bestkora.com\/IosDeveloper\/category\/swiftui\/"},{"label":"\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 Swift 5 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Combine \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0435\u0433\u043e \u0432 SwiftUI. \u0427\u0430\u0441\u0442\u044c 1. \u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0444\u0438\u043b\u044c\u043c\u043e\u0432.","link":"https:\/\/bestkora.com\/IosDeveloper\/modern-networking-in-swift-5-with-urlsession-combine-and-codable\/"}],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/bestkora.com\/IosDeveloper\/wp-json\/wp\/v2\/posts\/11605","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bestkora.com\/IosDeveloper\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bestkora.com\/IosDeveloper\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bestkora.com\/IosDeveloper\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bestkora.com\/IosDeveloper\/wp-json\/wp\/v2\/comments?post=11605"}],"version-history":[{"count":5,"href":"https:\/\/bestkora.com\/IosDeveloper\/wp-json\/wp\/v2\/posts\/11605\/revisions"}],"predecessor-version":[{"id":12102,"href":"https:\/\/bestkora.com\/IosDeveloper\/wp-json\/wp\/v2\/posts\/11605\/revisions\/12102"}],"wp:attachment":[{"href":"https:\/\/bestkora.com\/IosDeveloper\/wp-json\/wp\/v2\/media?parent=11605"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bestkora.com\/IosDeveloper\/wp-json\/wp\/v2\/categories?post=11605"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bestkora.com\/IosDeveloper\/wp-json\/wp\/v2\/tags?post=11605"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}