{"id":274954,"date":"2016-02-25T16:00:04","date_gmt":"2016-02-25T13:00:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=274954"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=274954","title":{"rendered":"\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 Firebase: \u043f\u0438\u0448\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 Swift"},"content":{"rendered":"<p>       \u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c Facebook \u0437\u0430\u043a\u0440\u044b\u0442\u044c Parse, \u043c\u043d\u043e\u0433\u043e\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0437\u0430\u0434\u0430\u043b\u0438\u0441\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043c\u0435\u0441\u0442\u043e \u043d\u0435\u0433\u043e. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435 \u0432\u0441\u0435\u043c. \u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u044d\u0442\u0438\u043c, iOS \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0432 \u0441\u0432\u043e\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u0435 \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 Apple \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0434\u0430\u043d\u043d\u044b\u043c. Backend-as-a-service, \u0438\u043b\u0438 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u043d\u043e BaaS \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0442\u0440\u044f\u0441\u0430\u044e\u0449\u0438\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432.<\/p>\n<p>  \u0421\u0440\u0435\u0434\u0438 \u043d\u0430\u0438\u043b\u0443\u0447\u0448\u0438\u0445 \u0438 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 BaaSs \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c Firebase \u043e\u0442 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 Google. \u041f\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443, Firebase \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u0435\u0437\u0443\u0441\u043b\u043e\u0432\u043d\u043e \u043f\u043e\u0442\u0440\u044f\u0441\u0430\u044e\u0449\u0438\u043c \u0432 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438. Firebase \u0441\u043b\u0443\u0436\u0438\u0442 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u0445\u0440\u0430\u043d\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 JSON. \u041b\u044e\u0431\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u0443\u0442 \u0436\u0435 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u0432\u0441\u0435\u043c\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c\u0438, \u0438\u043b\u0438 \u0434\u0435\u0432\u0430\u0439\u0441\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043e\u0434\u043d\u0443 \u0438 \u0442\u0443 \u0436\u0435 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445. \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 Firebase \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e.<\/p>\n<p>  \u0412\u043c\u0435\u0441\u0442\u0435 \u0441 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435\u043c, Firebase \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0443\u044e \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e, \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 SSL. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044e email \u0438 \u043f\u0430\u0440\u043e\u043b\u044f \u0434\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u0431\u0443\u0434\u044c \u0442\u043e Facebook, Twitter, GitHub, Google, \u0438\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0435.<\/p>\n<p>  \u0412 \u0434\u043e\u0431\u0430\u0432\u043a\u0443 \u043a iOS SDK, \u0443 Firebase \u0435\u0441\u0442\u044c SDK \u0434\u043b\u044f Android \u0438 JavaScript. \u0412\u0441\u0435 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u0443 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445.<br \/>  \u0421\u043b\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0447\u0442\u043e Firebase \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u044d\u0442\u0438\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438 \u0431\u044e\u0434\u0436\u0435\u0442\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u041d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438, \u0432 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u043c \u043f\u0430\u043a\u0435\u0442\u0435 Firebase \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0434\u043e 100 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439. \u042d\u0442\u043e\u0433\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0417\u0430 $49 \u0432 \u043c\u0435\u0441\u044f\u0446 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u043d\u0430 \u0441\u0435\u0442\u0435\u0432\u0443\u044e \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043d\u0435\u0442.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h3>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 FirebaseJokes<\/h3>\n<p>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0441\u0442\u0438\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0448\u0443\u0442\u043a\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Firebase. \u0412 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0430\u043a\u043a\u0430\u0443\u043d\u0442, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f email \u0438 \u043f\u0430\u0440\u043e\u043b\u044c. \u0422\u0430\u043a \u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0441\u0442\u0438\u0442\u044c \u0448\u0443\u0442\u043a\u0438, \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0448\u0443\u0442\u043e\u043a \u0431\u0443\u0434\u0435\u0442 \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c\u0441\u044f. \u041a\u043e\u0433\u0434\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u043e\u0441\u0442\u0438\u0442 \u043d\u043e\u0432\u0443\u044e \u0448\u0443\u0442\u043a\u0443, \u0441\u043f\u0438\u0441\u043e\u043a \u0441 \u0448\u0443\u0442\u043a\u0430\u043c\u0438 \u0442\u0430\u043a \u0436\u0435 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u0441\u044f. \u0415\u0449\u0435 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0441\u0430\u043c\u044b\u0435 \u0441\u043c\u0435\u0448\u043d\u044b\u0435 \u0448\u0443\u0442\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0431\u0430\u043b\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043d\u0438 \u0437\u0430\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u044e\u0442.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.appcoda.com\/wp-content\/uploads\/2016\/02\/firebase_screenshots.png\" alt=\"image\"\/><\/p>\n<p>  \u0412\u043e\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 FirebaseJokes:  <\/p>\n<ul>\n<li>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430<\/li>\n<li>\u0412\u0445\u043e\u0434 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e email \u0438 \u043f\u0430\u0440\u043e\u043b\u044f<\/li>\n<li>\u0412\u044b\u0445\u043e\u0434 \u0438\u0437 \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/li>\n<li>\u041f\u0440\u043e\u043f\u0443\u0441\u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439<\/li>\n<li>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u0448\u0443\u0442\u043e\u043a<\/li>\n<li>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0448\u0443\u0442\u043e\u043a \u0432 UITableView \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044f \u0430\u0432\u0442\u043e\u0440\u0430 \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0433\u043e\u043b\u043e\u0441\u043e\u0432<\/li>\n<li>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0442\u0434\u0430\u0442\u044c \u0433\u043e\u043b\u043e\u0441 \u0437\u0430 \u0448\u0443\u0442\u043a\u0443<\/li>\n<\/ul>\n<p>  \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c <a href=\"https:\/\/github.com\/appcoda\/FirebaseDemo\/releases\/download\/v1.0\/FirebaseJokesStarter.zip\">\u0441\u0442\u0430\u0440\u0442\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442<\/a>.<\/p>\n<p>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430, \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 Main.Storyboard \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0431 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.appcoda.com\/wp-content\/uploads\/2016\/02\/storyboard.png\" alt=\"image\"\/><\/p>\n<p>  \u0412 \u0445\u043e\u0434\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u044b \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 Firebase \u0438 \u0442\u043e \u0447\u0442\u043e \u043e\u043d \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442. \u041c\u044b \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u0442\u0435 \u0432\u0440\u0435\u043c\u044f \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u044f FirebaseJokes.<\/p>\n<h3>\u0412\u0440\u0435\u043c\u044f \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 Firebase<\/h3>\n<p>  \u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 <a href=\"https:\/\/www.firebase.com\">Firebase<\/a>\u00a0\u0438 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u0432 Firebase, \u0438\u043b\u0438 \u0432\u043e\u0439\u0434\u0435\u043c \u0432 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439. \u0422\u0430\u043a \u0436\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e GOOGLE \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430. \u041f\u043e\u0441\u043b\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0439\u0442\u0438 5\u0442\u0438 \u043c\u0438\u043d\u0443\u0442\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435, \u043d\u043e \u043e\u043d\u043e \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043e \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 JavaScript.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.appcoda.com\/wp-content\/uploads\/2016\/02\/firebase.jpg\" alt=\"image\"\/><\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0447\u0442\u043e \u043a \u0447\u0435\u043c\u0443 \u0432 Firebase, \u043d\u0430\u0436\u043c\u0438\u0442\u0435 Manage App \u0432 My First App. \u042d\u0442\u0430 \u043d\u043e\u0432\u0430\u044f \u0441\u0440\u0435\u0434\u0430 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430 \u043a\u0430\u043a Firebase Forge. \u042d\u0442\u043e \u043a\u0440\u0443\u0442\u043e\u0439 \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a, \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u043e\u0439\u0442\u0438 \u043f\u043e \u043d\u0435\u043c\u0443 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435. \u0423\u0440\u043e\u043a Forge \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0432\u0430\u043c \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043a\u043b\u044e\u0447\u0435\u0439, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438 \u0434\u0430\u0436\u0435 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u0443\u0437\u043b\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u043f\u043b\u044e\u0441. \u0418\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043d\u0430 JSON, \u043d\u0435 \u0442\u0430\u043a \u043b\u0438? \u0427\u0442\u043e\u0431\u044b \u0432\u044b\u0439\u0442\u0438 \u0438\u0437 \u043a\u0440\u0430\u0442\u043a\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f Forge, \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u043b\u0435\u0432\u043e\u043c \u0443\u0433\u043b\u0443 \u044d\u043a\u0440\u0430\u043d\u0430.<\/p>\n<h3> \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h3>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.appcoda.com\/wp-content\/uploads\/2016\/02\/create_new_app.png\" alt=\"image\"\/><\/p>\n<p>  \u0412\u0440\u0435\u043c\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c FirebaseJokes. \u0421\u043b\u0435\u0432\u0430 My First App, \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043d\u0430 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u0439 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0412 \u043f\u043e\u043b\u0435 APP NAME, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u201cJokes\u201d, \u0432 APP URL \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u201cjokes-\u0432\u0430\u0448\u0435-\u0438\u043c\u044f\u201d, \u0433\u0434\u0435 \u201c\u0432\u0430\u0448\u0435-\u0438\u043c\u044f\u201d \u044d\u0442\u043e \u0432\u0430\u0448\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f. \u041f\u043e\u043b\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c, \u0442.\u043a. \u044d\u0442\u043e url \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041d\u0430\u0436\u043c\u0438\u0442\u0435 CREATE NEW APP \u0438 \u043f\u043e\u0441\u043b\u0435 Manage App.<\/p>\n<p>  \u0418 \u0432\u043e\u0442 \u043d\u0430\u0448 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u044d\u043a\u0440\u0430\u043d Forge. \u041f\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u0434\u0435\u0441\u044c \u043e\u043d\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438. \u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0432\u043a\u043b\u0430\u0434\u043a\u0435 Forge. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445, \u043c\u044b \u0432\u0432\u0435\u0434\u0435\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u0440\u0443\u0447\u043d\u0443\u044e.<\/p>\n<ol>\n<li>\u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u00ab+\u00bb \u0432 \u0440\u044f\u0434\u0435 jokes-your-name .<\/li>\n<li>\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u201cjokes\u201d \u0432 \u043f\u043e\u043b\u0435 name.<\/li>\n<li>\u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u00ab+\u00bb \u0432 \u0440\u044f\u0434\u0435 \u0441 \u043d\u043e\u0432\u043e\u0439 \u0448\u0443\u0442\u043a\u043e\u0439.<\/li>\n<li>\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u043f\u043e\u043b\u0435 name.<\/li>\n<li>\u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u00ab+\u00bb \u0432 \u0440\u044f\u0434\u0435 \u0441 \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c.<\/li>\n<li>\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u201cjokeText\u201d \u0432 \u043f\u043e\u043b\u0435 name.<\/li>\n<li>\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u201cWhat did one computer say to the other? 11001001010101\u201d \u0432 \u043f\u043e\u043b\u0435 value.<\/li>\n<\/ol>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.appcoda.com\/wp-content\/uploads\/2016\/02\/forge_data.png\" alt=\"image\"\/><\/p>\n<p>  \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u201cjokes\u201d. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0448\u0443\u0442\u043a\u0438 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442 \u201cjokes\u201d. \u0422\u0430\u043a\u0436\u0435 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442 \u201cusers\u201d. \u041d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u0437\u0430 \u0442\u0435\u043c \u043a\u0430\u043a \u0432 Forge \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c, \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0438 \u0432 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u2014 \u044d\u0442\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430.<\/p>\n<p>  \u0425\u043e\u0447\u0443 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 Firebase \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 JSON. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 Parse, \u0442\u0443\u0442 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0442\u0430\u0431\u043b\u0438\u0446 \u0438 \u0437\u0430\u043f\u0438\u0441\u0435\u0439. \u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 Firebase, \u043e\u043d\u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u043a\u043b\u044e\u0447\u0435\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b JSON. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u0430\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043b\u0438, \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"objectivec\">{   &quot;jokes&quot; : {     &quot;e32e223r44&quot; : {       &quot;jokeText&quot; : &quot;What did one computer say to the other? 11001001010101&quot;     }   } } <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u043d\u0438\u044f \u043e \u0434\u0430\u043d\u043d\u044b\u0445 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 Firebas, \u043f\u043e\u0440\u0430 \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435.<br \/>  \u041d\u043e \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c, \u043a\u0430\u043a \u043c\u044b \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0443\u0434\u0430\u043b\u0438\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0442\u0430\u043a\u0436\u0435 \u043a\u0430\u043a \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e \u0438\u0437 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0414\u043b\u044f FirebaseJokes, \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0447\u0435\u0440\u0435\u0437 Email \u0438 \u043f\u0430\u0440\u043e\u043b\u044c. \u0427\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043d\u0430\u0436\u043c\u0438\u0442\u0435 Login &#038; Auth \u043d\u0430 \u043b\u0435\u0432\u043e\u0439 \u043f\u0430\u043d\u0435\u043b\u0438 \u0432 Forge. \u0412 Email &#038; Password, \u043f\u043e\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0433\u0430\u043b\u043e\u0447\u043a\u0443 \u043d\u0430 Enable Email &#038; Password Authentication. \u0421\u0440\u0430\u0437\u0443 \u043f\u043e\u0434 \u043d\u0430\u0436\u0430\u0442\u043e\u0439 \u044f\u0447\u0435\u0439\u043a\u043e\u0439 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e\u0431 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u0430\u0440\u043e\u043b\u044f. \u0422\u0430\u043a\u0436\u0435, \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u043e\u043f\u0446\u0438\u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.appcoda.com\/wp-content\/uploads\/2016\/02\/user_auth.png\" alt=\"image\"\/><\/p>\n<h3>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 Firebase SDK<\/h3>\n<p>  \u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f base url \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0432\u0435\u0440\u043d\u0438\u0442\u0435\u0441\u044c \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u044d\u043a\u0440\u0430\u043d Forge. \u0422\u0435\u043a\u0443\u0449\u0438\u0439 url \u0438 \u0435\u0441\u0442\u044c url \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0438 \u0432\u0441\u0442\u0430\u0432\u0438\u043c \u0435\u0433\u043e \u0432 BASE_URL \u0432 Constants.swift Xcode.<\/p>\n<pre><code class=\"objectivec\">import Foundation   let BASE_URL = &quot;https:\/\/jokes-matt-maher.firebaseio.com&quot; <\/code><\/pre>\n<p>  \u0421\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c Firebase SDK \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u041f\u0435\u0440\u0435\u0434 \u044d\u0442\u0438\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c CocoaPods. \u0415\u0441\u043b\u0438 \u0432\u044b \u0435\u0433\u043e \u0435\u0449\u0435 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 CocoaPods.<\/p>\n<p>  \u041a\u043e\u0433\u0434\u0430 CocoaPods \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d, \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f Cocoapods \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 Xcode:<\/p>\n<pre><code class=\"objectivec\">cd &lt;your-xcode-project-directory&gt; pod init <\/code><\/pre>\n<p>  \u0417\u0430\u0442\u0435\u043c \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043a\u0440\u044b\u0442\u044c Podfile \u0432 Xcode:  <\/p>\n<pre><code class=\"objectivec\">open -a Xcode Podfile <\/code><\/pre>\n<p>  \u041e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0435\u0433\u043e:<\/p>\n<pre><code class=\"objectivec\">platform :ios, '8.0' use_frameworks!   pod 'Firebase', '&gt;= 2.5.0' <\/code><\/pre>\n<p>  \u0417\u0430\u0442\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u0447\u0442\u043e\u0431\u044b \u0441\u043a\u0430\u0447\u0430\u0442\u044c Firebase SDK:<\/p>\n<pre><code class=\"objectivec\">pod install <\/code><\/pre>\n<p>  \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b FirebaseJokes.xcworkspace.<\/p>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e \u0431\u044b \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c Firebase SDK, \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 Objective-c File, FileType \u2014 Empty File. \u041d\u0430\u0437\u043e\u0432\u0438\u0442\u0435 \u0435\u0433\u043e Temp. \u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0444\u0430\u0439\u043b\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0441\u0442\u0441\u044f \u0444\u0430\u0439\u043b FirebaseJokes-Bridging-Header.h. \u0412 \u043d\u0435\u043c \u043f\u0440\u043e\u043f\u0438\u0448\u0438\u0442\u0435 \u0442\u0430\u043a\u0443\u044e \u0441\u0442\u0440\u043e\u0447\u043a\u0443:<\/p>\n<pre><code class=\"objectivec\">#import &lt;Firebase\/Firebase.h&gt; <\/code><\/pre>\n<p>  \u0423\u0434\u0430\u043b\u044f\u0435\u043c Temp.m, \u043e\u043d \u043d\u0430\u043c \u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f.<\/p>\n<h3>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Firebase SDK<\/h3>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u0436\u0438\u0437\u043d\u044c, \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0434\u0451\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0432 DataService.swift. \u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0441\u044b\u043b\u043e\u043a:<\/p>\n<pre><code class=\"objectivec\">import Foundation import Firebase   class DataService {     static let dataService = DataService()          private var _BASE_REF = Firebase(url: &quot;\\(BASE_URL)&quot;)     private var _USER_REF = Firebase(url: &quot;\\(BASE_URL)\/users&quot;)     private var _JOKE_REF = Firebase(url: &quot;\\(BASE_URL)\/jokes&quot;)          var BASE_REF: Firebase {         return _BASE_REF     }          var USER_REF: Firebase {         return _USER_REF     }          var CURRENT_USER_REF: Firebase {         let userID = NSUserDefaults.standardUserDefaults().valueForKey(&quot;uid&quot;) as! String                  let currentUser = Firebase(url: &quot;\\(BASE_REF)&quot;).childByAppendingPath(&quot;users&quot;).childByAppendingPath(userID)                  return currentUser!     }          var JOKE_REF: Firebase {         return _JOKE_REF     } } <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Firebase, \u043d\u0443\u0436\u043d\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0440\u0430\u0435\u043c\u0432\u043e\u0440\u043a Firebase. \u041a\u043b\u0430\u0441\u0441\u00a0DataService \u0441\u043b\u0443\u0436\u0435\u0442 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 Firebase. \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0438\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 Firebase \u0441 Firebase URL. Base URL \u044d\u0442\u043e URL \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041f\u043e\u0437\u0436\u0435 \u043c\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u0432\u0441\u0435\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u0432\u0441\u0435 \u0448\u0443\u0442\u043a\u0438 \u0432 \u0432\u0438\u0434\u0435 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u0443\u0437\u043b\u043e\u0432. \u0427\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u043c \u0443\u0437\u043b\u0430\u043c, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0435 \u0438\u043c\u044f (\u0442\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439) \u043a \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c\u0443 URL.<\/p>\n<h3> \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 <\/h3>\n<p>  \u041c\u044b \u043d\u0430\u0447\u043d\u0435\u043c \u0441 CreateAccountViewController.swift. \u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a.<\/p>\n<pre><code class=\"objectivec\">import UIKit import Firebase   class CreateAccountViewController: UIViewController { <\/code><\/pre>\n<p>  \u0412 \u043c\u0435\u0442\u043e\u0434\u0435\u00a0createAccount(), \u043c\u044b \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0442\u0435\u043a\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0432\u0435\u043b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u042d\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u0430 Firebase\u00a0createUser(). \u041e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043c\u0435\u0442\u043e\u0434 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"objectivec\">@IBAction func createAccount(sender: AnyObject) {     let username = usernameField.text     let email = emailField.text     let password = passwordField.text          if username != &quot;&quot; && email != &quot;&quot; && password != &quot;&quot; {                  \/\/ Set Email and Password for the New User.                  DataService.dataService.BASE_REF.createUser(email, password: password, withValueCompletionBlock: { error, result in                          if error != nil {                                  \/\/ There was a problem.                 self.signupErrorAlert(&quot;Oops!&quot;, message: &quot;Having some trouble creating your account. Try again.&quot;)                              } else {                                  \/\/ Create and Login the New User with authUser                 DataService.dataService.BASE_REF.authUser(email, password: password, withCompletionBlock: {                     err, authData in                                          let user = [&quot;provider&quot;: authData.provider!, &quot;email&quot;: email!, &quot;username&quot;: username!]                                          \/\/ Seal the deal in DataService.swift.                     DataService.dataService.createNewAccount(authData.uid, user: user)                 })                                  \/\/ Store the uid for future access - handy!                 NSUserDefaults.standardUserDefaults().setValue(result [&quot;uid&quot;], forKey: &quot;uid&quot;)                                  \/\/ Enter the app.                 self.performSegueWithIdentifier(&quot;NewUserLoggedIn&quot;, sender: nil)             }         })              } else {         signupErrorAlert(&quot;Oops!&quot;, message: &quot;Don't forget to enter your email, password, and a username.&quot;)     }   } <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043d\u043e\u0432\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u0430, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u0438 \u0441\u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u0439\u0442\u0438 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0414\u043b\u044f \u043b\u044e\u0431\u043e\u0439 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u044e\u0449\u0435\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043c\u0435\u0442\u043e\u0434 \u0432 \u043a\u043b\u0430\u0441\u0441:<\/p>\n<pre><code class=\"objectivec\">func signupErrorAlert(title: String, message: String) {                  \/\/ Called upon signup error to let the user know signup didn't work.                  let alert = UIAlertController(title: title, message: message, preferredStyle: UIAlertControllerStyle.Alert)         let action = UIAlertAction(title: &quot;Ok&quot;, style: .Default, handler: nil)         alert.addAction(action)         presentViewController(alert, animated: true, completion: nil)     } <\/code><\/pre>\n<p>  \u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u043c\u0435\u0442\u043e\u0434\u0435\u00a0createNewAccount()\u00a0\u0432 DataService.swift.<\/p>\n<pre><code class=\"objectivec\">func createNewAccount(uid: String, user: Dictionary&lt;String, String&gt;) {                  \/\/ A User is born.                  USER_REF.childByAppendingPath(uid).setValue(user)     } <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 Firebase, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 setValue. \u0412 \u043a\u043e\u0434\u0435 \u0432\u044b\u0448\u0435, \u043e\u0431\u044a\u0435\u043a\u0442 user \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0434 \u043a\u043b\u044e\u0447\u043e\u043c\u00a0users\u00a0\u043d\u0430\u0434 \u0434\u0430\u043d\u043d\u044b\u043c \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u043c \u0443\u0437\u043b\u043e\u043c\u00a0uid (\u043f\u0440\u0438\u043c. \/users\/1283834\/).<\/p>\n<p>  \u041a\u0440\u043e\u043c\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 Firebase, \u043c\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043c uid\u00a0\u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 NSUserDefaults. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<h3>\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/h3>\n<p>  \u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0434\u0430\u043b\u044c\u0448\u0435, \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c Firebase \u0432 LoginViewController.swift. \u0422\u0430\u043a \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043e\u0442\u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0435\u0441\u043b\u0438 \u043a\u0442\u043e-\u0442\u043e \u0443\u0436\u0435 \u0432\u0445\u043e\u0434\u0438\u043b \u0438\u043b\u0438 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<br \/>  \u0412 \u043c\u0435\u0442\u043e\u0434\u0435\u00a0viewDidAppear(), \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u043d\u0430\u0448 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0439 \u201cuid\u201d \u00a0nil\u00a0\u0438 \u0438\u043c\u0435\u0435\u0442 \u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0430\u043a\u043a\u0430\u0443\u043d\u0442. \u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0431\u044b\u043b \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d, \u043e\u043d \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u044d\u043a\u0440\u0430\u043d \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043d\u0443\u0436\u0434\u0435\u043d \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<pre><code class=\"objectivec\">override func viewDidAppear(animated: Bool) {         super.viewDidAppear(animated)                  \/\/ If we have the uid stored, the user is already logger in - no need to sign in again!                  if NSUserDefaults.standardUserDefaults().valueForKey(&quot;uid&quot;) != nil && DataService.dataService.CURRENT_USER_REF.authData != nil {             self.performSegueWithIdentifier(&quot;CurrentlyLoggedIn&quot;, sender: nil)         }     } <\/code><\/pre>\n<p>  \u041c\u0435\u0442\u043e\u0434 tryLogin(), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438. \u041e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0438\u0436\u0435 \u0438 \u0432\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 loginErrorAlert:<\/p>\n<pre><code class=\"objectivec\">@IBAction func tryLogin(sender: AnyObject) {                  let email = emailField.text         let password = passwordField.text                  if email != &quot;&quot; && password != &quot;&quot; {                          \/\/ Login with the Firebase's authUser method                          DataService.dataService.BASE_REF.authUser(email, password: password, withCompletionBlock: { error, authData in                                  if error != nil {                     print(error)                     self.loginErrorAlert(&quot;Oops!&quot;, message: &quot;Check your username and password.&quot;)                 } else {                                          \/\/ Be sure the correct uid is stored.                                          NSUserDefaults.standardUserDefaults().setValue(authData.uid, forKey: &quot;uid&quot;)                                          \/\/ Enter the app!                                          self.performSegueWithIdentifier(&quot;CurrentlyLoggedIn&quot;, sender: nil)                 }             })                      } else {                          \/\/ There was a problem                          loginErrorAlert(&quot;Oops!&quot;, message: &quot;Don't forget to enter your email and password.&quot;)         }     }          func loginErrorAlert(title: String, message: String) {                  \/\/ Called upon login error to let the user know login didn't work.                  let alert = UIAlertController(title: title, message: message, preferredStyle: UIAlertControllerStyle.Alert)         let action = UIAlertAction(title: &quot;Ok&quot;, style: .Default, handler: nil)         alert.addAction(action)         presentViewController(alert, animated: true, completion: nil)     } <\/code><\/pre>\n<p>  Firebase \u0438\u043c\u0435\u0435\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0443\u044e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0434\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e email \u0430\u0434\u0440\u0435\u0441\u0430 \u0438 \u043f\u0430\u0440\u043e\u043b\u044f. \u041d\u0430\u0448 \u043c\u0435\u0442\u043e\u0434 tryLogin()\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043c\u0435\u0442\u043e\u0434\u00a0authUser(), \u043a\u043e\u0442\u043e\u0440\u044b\u0439\u00a0\u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043b\u0438 email \u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0415\u0441\u043b\u0438 \u0434\u0430, \u043c\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u201cuid\u201d \u0438 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u043c \u0432\u043d\u0443\u0442\u0440\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u043c\u044b \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u044f\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0447\u0442\u043e \u0431\u044b \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u043b \u043f\u043e\u043f\u044b\u0442\u043a\u0443 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0433\u043e\u0442\u043e\u0432\u043e \u0434\u043b\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u043f\u043e\u0440\u0430 \u043f\u0440\u0435\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u0441\u0430\u043c\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<h3>\u041e\u0431\u044a\u0435\u043a\u0442 Joke<\/h3>\n<p>  \u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a\u00a0Joke.swift\u00a0\u0438 \u0441\u0434\u0435\u043b\u0430\u0435\u043c import Firebase. \u0412 \u043d\u0430\u0448\u0435\u0439 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0448\u0443\u0442\u043a\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043d\u043e\u043c\u0435\u0440\u043e\u043c ID. \u042d\u0442\u043e \u0447\u0438\u0441\u043b\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0432\u0441\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0448\u0443\u0442\u043a\u0438. \u0412\u043e\u0442 \u043e\u043d\u0438:  <\/p>\n<ul>\n<li>jokeText<\/li>\n<li>jokeVotes<\/li>\n<li>username (\u0430\u0432\u0442\u043e\u0440 \u0448\u0443\u0442\u043a\u0438)<\/li>\n<\/ul>\n<p>  \u041c\u044b \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 init(), \u0433\u0434\u0435 id \u0448\u0443\u0442\u043a\u0438 \u043a\u043b\u044e\u0447, \u0434\u0430\u043d\u043d\u044b\u0435 \u0448\u0443\u0442\u043a\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0441\u043b\u043e\u0432\u0430\u0440\u044f.<\/p>\n<pre><code class=\"objectivec\">class Joke {     private var _jokeRef: Firebase!          private var _jokeKey: String!     private var _jokeText: String!     private var _jokeVotes: Int!     private var _username: String!          var jokeKey: String {         return _jokeKey     }          var jokeText: String {         return _jokeText     }          var jokeVotes: Int {         return _jokeVotes     }          var username: String {         return _username     }          \/\/ Initialize the new Joke          init(key: String, dictionary: Dictionary&lt;String, AnyObject&gt;) {         self._jokeKey = key                  \/\/ Within the Joke, or Key, the following properties are children                  if let votes = dictionary[&quot;votes&quot;] as? Int {             self._jokeVotes = votes         }                  if let joke = dictionary[&quot;jokeText&quot;] as? String {             self._jokeText = joke         }                  if let user = dictionary[&quot;author&quot;] as? String {             self._username = user         } else {             self._username = &quot;&quot;         }                  \/\/ The above properties are assigned to their key.                  self._jokeRef = DataService.dataService.JOKE_REF.childByAppendingPath(self._jokeKey)     } } <\/code><\/pre>\n<h3>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u0448\u0443\u0442\u043e\u043a<\/h3>\n<p>  \u0412\u00a0AddJokeViewController.swift \u0434\u0435\u043b\u0430\u0435\u043c \u0438\u043c\u043f\u043e\u0440\u0442 Firebase. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0448\u0443\u0442\u043a\u0443, \u0438 \u043c\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0435 \u0432 \u043d\u0430\u0448\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435, \u043e\u0442\u043a\u0443\u0434\u0430 \u043e\u043d\u0430 \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u043d\u0430 \u0432\u0441\u0435 \u0434\u0435\u0432\u0430\u0439\u0441\u044b.<\/p>\n<p>  \u0412 \u043c\u0435\u0442\u043e\u0434\u0435\u00a0viewDidLoad(), \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 username, \u0442\u0430\u043a \u0447\u0442\u043e \u0441\u043c\u043e\u0436\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0430 \u043d\u043e\u0432\u043e\u0439 \u0448\u0443\u0442\u043a\u0438.<\/p>\n<pre><code class=\"objectivec\">override func viewDidLoad() {         super.viewDidLoad()                  \/\/ Get username of the current user, and set it to currentUsername, so we can add it to the Joke.                  DataService.dataService.CURRENT_USER_REF.observeEventType(FEventType.Value, withBlock: { snapshot in                          let currentUser = snapshot.value.objectForKey(&quot;username&quot;) as! String                          print(&quot;Username: \\(currentUser)&quot;)             self.currentUsername = currentUser             }, withCancelBlock: { error in                 print(error.description)         })     } <\/code><\/pre>\n<p>  \u041f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u043c\u0435\u0442\u043e\u0434\u0430\u00a0saveJoke()\u00a0, \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u043e\u0432\u0430\u0440\u044c newJoke, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0435\u0440\u0435\u0442 \u0442\u0435\u043a\u0441\u0442 \u0441 jokeField, \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 0 \u0434\u043b\u044f votes, \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0433\u043e\u043b\u043e\u0441\u043e\u0432, \u0438 \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u2013 author. \u042d\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u044e\u0442 \u0438\u0445 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c ids \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u043c\u0435\u0442\u043e\u0434 \u00a0createNewJoke()\u0432 DataService \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f. <br \/>  \u041f\u0440\u043e\u043f\u0438\u0448\u0438\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0432 \u043a\u043b\u0430\u0441\u0441\u0435\u00a0AddJokeViewController:<\/p>\n<pre><code class=\"objectivec\">var currentUsername = &quot;&quot; <\/code><\/pre>\n<p>  \u041e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 \u043c\u0435\u0442\u043e\u0434\u00a0saveJoke\u00a0:<\/p>\n<pre><code class=\"objectivec\">@IBAction func saveJoke(sender: AnyObject) {                  let jokeText = jokeField.text                  if jokeText != &quot;&quot; {                          \/\/ Build the new Joke.              \/\/ AnyObject is needed because of the votes of type Int.                          let newJoke: Dictionary&lt;String, AnyObject&gt; = [                 &quot;jokeText&quot;: jokeText!,                 &quot;votes&quot;: 0,                 &quot;author&quot;: currentUsername             ]                          \/\/ Send it over to DataService to seal the deal.                          DataService.dataService.createNewJoke(newJoke)                          if let navController = self.navigationController {                 navController.popViewControllerAnimated(true)             }         }     } <\/code><\/pre>\n<p>  \u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Dictionary \u0447\u0442\u043e\u0431\u044b \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0448\u0443\u0442\u043a\u0438. \u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 createNewJoke\u00a0\u0432 DataService. \u0412 DataService.swift, \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043c\u0435\u0442\u043e\u0434 createNewJoke:<\/p>\n<pre><code class=\"objectivec\">func createNewJoke(joke: Dictionary&lt;String, AnyObject&gt;) {                  \/\/ Save the Joke         \/\/ JOKE_REF is the parent of the new Joke: &quot;jokes&quot;.         \/\/ childByAutoId() saves the joke and gives it its own ID.                  let firebaseNewJoke = JOKE_REF.childByAutoId()                  \/\/ setValue() saves to Firebase.                  firebaseNewJoke.setValue(joke) } <\/code><\/pre>\n<p>  \u041e\u043f\u044f\u0442\u044c \u0436\u0435, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 setValue(). \u041a\u043e\u0433\u0434\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 childByAutoId Firebase \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 ID \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0448\u0443\u0442\u043a\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043c\u0430\u0440\u043a\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e \u0448\u0443\u0442\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 ID.<\/p>\n<h3>\u0412\u044b\u0445\u043e\u0434 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438\u0437 \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/h3>\n<p>  \u041e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u043e \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u044e\u0442 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 Settings \u0438\u043b\u0438 Profile, \u043d\u043e \u043c\u044b \u0434\u0430\u0434\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0439\u0442\u0438 \u0432\u00a0AddJokeViewController.swift.<\/p>\n<p>  \u041c\u0435\u0442\u043e\u0434 logout()\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 Firebase \u043c\u0435\u0442\u043e\u0434\u00a0unauth()\u00a0, \u0434\u043b\u044f \u0434\u0435\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438. \u0422\u0430\u043a \u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0431\u0440\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u201cuid\u201d \u0441 \u043d\u0430\u0448\u0435\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043a LoginViewController.<\/p>\n<p>  \u041e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 \u043c\u0435\u0442\u043e\u0434\u00a0logout:<\/p>\n<pre><code class=\"objectivec\">@IBAction func logout(sender: AnyObject) {                  \/\/ unauth() is the logout method for the current user.                  DataService.dataService.CURRENT_USER_REF.unauth()                  \/\/ Remove the user's uid from storage.                  NSUserDefaults.standardUserDefaults().setValue(nil, forKey: &quot;uid&quot;)                  \/\/ Head back to Login!                  let loginViewController = self.storyboard!.instantiateViewControllerWithIdentifier(&quot;Login&quot;)         UIApplication.sharedApplication().keyWindow?.rootViewController = loginViewController } <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u201cuid\u201d, \u0443 \u0432\u0430\u0441 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043f\u0440\u0438 \u0432\u0445\u043e\u0434\u0435 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<h3>\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0448\u0443\u0442\u043e\u043a \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435<\/h3>\n<p>  \u0412 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0441\u0447\u0435\u0442\u0435, \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0441 Firebase. \u041c\u044b \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0448\u0443\u0442\u043e\u043a \u0432 UITableView \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0432 JokesFeedTableViewController.swift. \u041d\u0435 \u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c Firebase.<\/p>\n<p>  \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u043c\u0435\u0442\u043e\u0434\u0430\u00a0viewDidLoad(). \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0430\u0448 \u043c\u0435\u0442\u043e\u0434\u00a0observeEventType(). \u0414\u0430\u043d\u043d\u044b\u0435 Firebase \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u043f\u0443\u0442\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u0441\u043b\u0443\u0448\u0430\u0442\u0435\u043b\u044f \u043a \u0441\u0441\u044b\u043b\u043a\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043e viewDidLoad()\u00a0\u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u043d\u0430 JokesFeedTableViewController.swift, \u0435\u0433\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442 \u043f\u0440\u0438 \u043b\u044e\u0431\u044b\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u0445 \u0432 jokes \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<pre><code class=\"objectivec\">var jokes = [Joke]()          override func viewDidLoad() {         super.viewDidLoad()                  \/\/ observeEventType is called whenever anything changes in the Firebase - new Jokes or Votes.         \/\/ It's also called here in viewDidLoad().         \/\/ It's always listening.                  DataService.dataService.JOKE_REF.observeEventType(.Value, withBlock: { snapshot in                          \/\/ The snapshot is a current look at our jokes data.                          print(snapshot.value)                          self.jokes = []                          if let snapshots = snapshot.children.allObjects as? [FDataSnapshot] {                                  for snap in snapshots {                                          \/\/ Make our jokes array for the tableView.                                          if let postDictionary = snap.value as? Dictionary&lt;String, AnyObject&gt; {                         let key = snap.key                         let joke = Joke(key: key, dictionary: postDictionary)                                                  \/\/ Items are returned chronologically, but it's more fun with the newest jokes first.                                                  self.jokes.insert(joke, atIndex: 0)                     }                 }                              }                          \/\/ Be sure that the tableView updates when there is new data.                          self.tableView.reloadData()         })  } <\/code><\/pre>\n<p>  \u041c\u0435\u0442\u043e\u0434 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043d\u0438\u043c\u043e\u043a. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u043d\u0438\u043c\u043e\u043a, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u044f\u0434 \u0448\u0443\u0442\u043e\u043a \u0434\u043b\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0430\u0448\u0435\u0439 tableView. \u0414\u043b\u044f \u0448\u0443\u0442\u043e\u043a Firebase, \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a, \u0433\u0434\u0435 \u043d\u043e\u0432\u044b\u0435 \u0448\u0443\u0442\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u0432\u0432\u0435\u0440\u0445\u0443. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 Firebase \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442 \u0448\u0443\u0442\u043a\u0438 \u0432 \u0445\u0440\u043e\u043d\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u044f\u0434 \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438.<\/p>\n<p>  \u0425\u043e\u0440\u043e\u0448\u043e \u0431\u044b \u0438\u043c\u0435\u0442\u044c \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u044e\u0449\u0438\u0439\u0441\u044f \u043c\u0430\u0441\u0441\u0438\u0432 \u0448\u0443\u0442\u043e\u043a, \u043c\u044b \u043f\u043e\u043c\u043d\u0438\u043c \u043f\u0440\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 tableView \u0447\u0442\u043e\u0431\u044b \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0438\u0445. <\/p>\n<p>  \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u00a0tableView:cellForRowAtIndexPath:\u00a0\u0438 \u043d\u0430\u0448\u0435\u0439 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0439 \u044f\u0447\u0435\u0439\u043a\u043e\u0439, JokeCellTableViewCell.swift. \u0412 \u043c\u0435\u0442\u043e\u0434\u0435\u00a0tableView:cellForRowAtIndexPath: \u043c\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0448\u0443\u0442\u043a\u0443 \u0432 \u043c\u0435\u0442\u043e\u0434 \u00a0configureCell()\u00a0\u0432 JokeCellTableViewCell.swift.<\/p>\n<pre><code class=\"objectivec\">override func numberOfSectionsInTableView(tableView: UITableView) -&gt; Int {                  return 1     }          override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {                  return jokes.count     }               override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {                  let joke = jokes[indexPath.row]                  \/\/ We are using a custom cell.                   if let cell = tableView.dequeueReusableCellWithIdentifier(&quot;JokeCellTableViewCell&quot;) as? JokeCellTableViewCell {                          \/\/ Send the single joke to configureCell() in JokeCellTableViewCell.                          cell.configureCell(joke)                          return cell                      } else {                          return JokeCellTableViewCell()                      }     } configureCell(), in JokeCellTableViewCell.swift, is where we set the labels and listen for a vote tap.   func configureCell(joke: Joke) {         self.joke = joke                  \/\/ Set the labels and textView.                  self.jokeText.text = joke.jokeText         self.totalVotesLabel.text = &quot;Total Votes: \\(joke.jokeVotes)&quot;         self.usernameLabel.text = joke.username                  \/\/ Set &quot;votes&quot; as a child of the current user in Firebase and save the joke's key in votes as a boolean.                  voteRef = DataService.dataService.CURRENT_USER_REF.childByAppendingPath(&quot;votes&quot;).childByAppendingPath(joke.jokeKey)                  \/\/ observeSingleEventOfType() listens for the thumb to be tapped, by any user, on any device.                  voteRef.observeSingleEventOfType(.Value, withBlock: { snapshot in                          \/\/ Set the thumb image.                          if let thumbsUpDown = snapshot.value as? NSNull {                                  \/\/ Current user hasn't voted for the joke... yet.                                  print(thumbsUpDown)                 self.thumbVoteImage.image = UIImage(named: &quot;thumb-down&quot;)             } else {                                  \/\/ Current user voted for the joke!                                  self.thumbVoteImage.image = UIImage(named: &quot;thumb-up&quot;)             }         })     }  func configureCell(joke: Joke) {         self.joke = joke                  \/\/ Set the labels and textView.                  self.jokeText.text = joke.jokeText         self.totalVotesLabel.text = &quot;Total Votes: \\(joke.jokeVotes)&quot;         self.usernameLabel.text = joke.username                  \/\/ Set &quot;votes&quot; as a child of the current user in Firebase and save the joke's key in votes as a boolean.                  voteRef = DataService.dataService.CURRENT_USER_REF.childByAppendingPath(&quot;votes&quot;).childByAppendingPath(joke.jokeKey)                  \/\/ observeSingleEventOfType() listens for the thumb to be tapped, by any user, on any device.                  voteRef.observeSingleEventOfType(.Value, withBlock: { snapshot in                          \/\/ Set the thumb image.                          if let thumbsUpDown = snapshot.value as? NSNull {                                  \/\/ Current user hasn't voted for the joke... yet.                                  print(thumbsUpDown)                 self.thumbVoteImage.image = UIImage(named: &quot;thumb-down&quot;)             } else {                                  \/\/ Current user voted for the joke!                                  self.thumbVoteImage.image = UIImage(named: &quot;thumb-up&quot;)             }         }) } <\/code><\/pre>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043c\u0435\u0442\u043e\u0434 configureCell(), \u0432 JokeCellTableViewCell.swift.<\/p>\n<pre><code class=\"objectivec\">var joke: Joke! var voteRef: Firebase!      override func awakeFromNib() {     super.awakeFromNib()          \/\/ UITapGestureRecognizer is set programatically.          let tap = UITapGestureRecognizer(target: self, action: &quot;voteTapped:&quot;)     tap.numberOfTapsRequired = 1     thumbVoteImage.addGestureRecognizer(tap)     thumbVoteImage.userInteractionEnabled = true } <\/code><\/pre>\n<p>  \u0412 \u043c\u0435\u0442\u043e\u0434\u0435\u00a0voteTapped() \u0441\u043b\u0443\u0448\u0430\u0442\u0435\u043b\u044c \u043e\u0436\u0438\u0434\u0430\u0435\u0442 \u0441\u0438\u0433\u043d\u0430\u043b\u0430. \u0412 \u044d\u0442\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u00ab\u0433\u043e\u043b\u043e\u0441\u0430\u00bb \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u043a\u043b\u044e\u0447\u043e\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u043c id \u0448\u0443\u0442\u043a\u0438 \u0438 true \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0412\u0441\u0435 \u044d\u0442\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 voteRef \u0432 \u043c\u0435\u0442\u043e\u0434\u00a0configureCell().<\/p>\n<pre><code class=\"objectivec\">func voteTapped(sender: UITapGestureRecognizer) {                  \/\/ observeSingleEventOfType listens for a tap by the current user.                  voteRef.observeSingleEventOfType(.Value, withBlock: { snapshot in                          if let thumbsUpDown = snapshot.value as? NSNull {                 print(thumbsUpDown)                 self.thumbVoteImage.image = UIImage(named: &quot;thumb-down&quot;)                                  \/\/ addSubtractVote(), in Joke.swift, handles the vote.                                  self.joke.addSubtractVote(true)                                  \/\/ setValue saves the vote as true for the current user.                 \/\/ voteRef is a reference to the user's &quot;votes&quot; path.                                  self.voteRef.setValue(true)             } else {                 self.thumbVoteImage.image = UIImage(named: &quot;thumb-up&quot;)                 self.joke.addSubtractVote(false)                 self.voteRef.removeValue()             }                      })     } <\/code><\/pre>\n<p>  \u041c\u0435\u0442\u043e\u0434 voteTapped()\u00a0\u0442\u0430\u043a\u0436\u0435 \u0440\u0435\u0442\u0440\u0430\u043d\u0441\u043b\u0438\u0440\u0443\u0435\u0442 \u0441\u0438\u0433\u043d\u0430\u043b \u043a\u0430\u043a \u0431\u0443\u043b\u0435\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u043c\u0435\u0442\u043e\u0434\u00a0addSubtractVote()\u00a0\u0432 Joke.swift. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 true \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b \u0437\u0430 \u0448\u0443\u0442\u043a\u0443; \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a false \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0435\u0449\u0435 \u043d\u0435 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b \u0437\u0430 \u043d\u0435\u0435.<\/p>\n<pre><code class=\"objectivec\">\/\/ Add or Subtract a Vote from the Joke.          func addSubtractVote(addVote: Bool) {                  if addVote {             _jokeVotes = _jokeVotes + 1         } else {             _jokeVotes = _jokeVotes - 1         }                  \/\/ Save the new vote total.                  _jokeRef.childByAppendingPath(&quot;votes&quot;).setValue(_jokeVotes)              } <\/code><\/pre>\n<p>  \u041c\u0435\u0442\u043e\u0434 addSubtractVote(), \u0432 Joke.swift, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0431\u0443\u043b\u0435\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u043b\u0438 \u0432\u044b\u0447\u0435\u0441\u0442\u044c vote \u0438\u0437 joke. \u0417\u0430\u0442\u0435\u043c, \u043c\u0435\u0442\u043e\u0434 Firebase\u00a0setValue()\u00a0\u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0433\u043e\u043b\u043e\u0441\u0430 \u043f\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044e \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h3>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h3>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0448\u0443\u0442\u043e\u043a. \u0423 \u0432\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u0442\u044c \u0437\u0430 \u0448\u0443\u0442\u043a\u0438. \u0418 \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0432 \u043f\u0430\u043d\u0435\u043b\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0442\u043e \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0448\u0443\u0442\u043a\u0438.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.appcoda.com\/wp-content\/uploads\/2016\/02\/joke-firebase-data.png\" alt=\"image\"\/><\/p>\n<h3>\u041f\u043e\u0434\u0432\u0435\u0434\u0435\u043c \u0438\u0442\u043e\u0433<\/h3>\n<p>  \u041c\u044b \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b\u0438! \u042d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0437\u0430\u0431\u0430\u0432\u043d\u043e\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0435\u0433\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043e\u0442\u043a\u043b\u0438\u043a\u0430. \u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043e\u043f\u044b\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Firebase.<\/p>\n<p>  \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u00a0<a href=\"https:\/\/github.com\/appcoda\/FirebaseDemo\/archive\/master.zip\">finished FirebaseJokes project on GitHub.<\/a><\/p>\n<p>  \u2028\u0414\u043b\u044f IOS \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0446\u0435\u043b\u044b\u0439 \u043c\u0438\u0440 \u043d\u043e\u0432\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0441 Firebase. \u0420\u0430\u0431\u043e\u0442\u0430 \u0441 FirebaseJokes \u043f\u043e\u0441\u043b\u0443\u0436\u0438\u0442 \u0445\u043e\u0440\u043e\u0448\u0435\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0439, \u043d\u043e \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0430\u043b\u043e.<\/p>\n<p>  \u0421\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u043e\u043f\u0446\u0438\u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0439\u0442\u0435 \u043d\u043e\u0432\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043a FirebaseJokes, \u0438\u0437\u0443\u0447\u0430\u0439\u0442\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0447\u0430\u0442\u0430, \u043a\u043e\u0440\u043e\u0447\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u043f\u043e\u043b\u043d\u043e.<\/p>\n<p>  \u2028\u041f\u0430\u0440\u0443 \u0441\u043e\u0432\u0435\u0442\u043e\u0432 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439: Firebase \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043a\u0440\u043e\u043c\u043d\u044b\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f \u0438\u0445 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043b\u0443\u0447\u0448\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u043c\u0435\u0441\u0442\u0435.<\/p>\n<p>  \u0423\u0434\u0430\u0447\u0438 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044f \u0441 Firebase \u0432 \u0432\u0430\u0448\u0438\u0445 \u0431\u0443\u0434\u0443\u0449\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445!       <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/277941\/\"> https:\/\/habrahabr.ru\/post\/277941\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c Facebook \u0437\u0430\u043a\u0440\u044b\u0442\u044c Parse, \u043c\u043d\u043e\u0433\u043e\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0437\u0430\u0434\u0430\u043b\u0438\u0441\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043c\u0435\u0441\u0442\u043e \u043d\u0435\u0433\u043e. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435 \u0432\u0441\u0435\u043c. \u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u044d\u0442\u0438\u043c, iOS \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0432 \u0441\u0432\u043e\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u0435 \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 Apple \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0434\u0430\u043d\u043d\u044b\u043c. Backend-as-a-service, \u0438\u043b\u0438 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u043d\u043e BaaS \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0442\u0440\u044f\u0441\u0430\u044e\u0449\u0438\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432.<\/p>\n<p>  \u0421\u0440\u0435\u0434\u0438 \u043d\u0430\u0438\u043b\u0443\u0447\u0448\u0438\u0445 \u0438 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 BaaSs \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c Firebase \u043e\u0442 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 Google. \u041f\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443, Firebase \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u0435\u0437\u0443\u0441\u043b\u043e\u0432\u043d\u043e \u043f\u043e\u0442\u0440\u044f\u0441\u0430\u044e\u0449\u0438\u043c \u0432 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438. Firebase \u0441\u043b\u0443\u0436\u0438\u0442 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u0445\u0440\u0430\u043d\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 JSON. \u041b\u044e\u0431\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u0443\u0442 \u0436\u0435 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u0432\u0441\u0435\u043c\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c\u0438, \u0438\u043b\u0438 \u0434\u0435\u0432\u0430\u0439\u0441\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043e\u0434\u043d\u0443 \u0438 \u0442\u0443 \u0436\u0435 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445. \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 Firebase \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e.<\/p>\n<p>  \u0412\u043c\u0435\u0441\u0442\u0435 \u0441 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435\u043c, Firebase \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0443\u044e \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e, \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 SSL. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044e email \u0438 \u043f\u0430\u0440\u043e\u043b\u044f \u0434\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u0431\u0443\u0434\u044c \u0442\u043e Facebook, Twitter, GitHub, Google, \u0438\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0435.<\/p>\n<p>  \u0412 \u0434\u043e\u0431\u0430\u0432\u043a\u0443 \u043a iOS SDK, \u0443 Firebase \u0435\u0441\u0442\u044c SDK \u0434\u043b\u044f Android \u0438 JavaScript. \u0412\u0441\u0435 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u0443 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445.<br \/>  \u0421\u043b\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0447\u0442\u043e Firebase \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u044d\u0442\u0438\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438 \u0431\u044e\u0434\u0436\u0435\u0442\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u041d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438, \u0432 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u043c \u043f\u0430\u043a\u0435\u0442\u0435 Firebase \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0434\u043e 100 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439. \u042d\u0442\u043e\u0433\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0417\u0430 $49 \u0432 \u043c\u0435\u0441\u044f\u0446 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u043d\u0430 \u0441\u0435\u0442\u0435\u0432\u0443\u044e \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043d\u0435\u0442.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-274954","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/274954","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=274954"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/274954\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=274954"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=274954"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=274954"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}