{"id":173449,"date":"2013-03-19T15:38:04","date_gmt":"2013-03-19T11:38:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=173449"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=173449","title":{"rendered":"<span class=\"post_title\">\u041a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0438\u0433\u0440\u0443 \u0441 \u043c\u0443\u043b\u044c\u0442\u0438\u043f\u043b\u0435\u0435\u0440\u043e\u043c \u0447\u0435\u0440\u0435\u0437 Game Center. \u0427\u0430\u0441\u0442\u044c 1: \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 Game Center&#8217;a \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/span>"},"content":{"rendered":"<div class=\"content html_format\">       <img decoding=\"async\" src=\"http:\/\/img23.binimage.org\/55\/70\/07\/macgamecenter.png\" alt=\"image\"\/><\/p>\n<p>  <i>\u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0430 \u043f\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043c\u0443\u043b\u044c\u0442\u0438\u043f\u043b\u0435\u0435\u0440\u0430 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Game Center \u0432 iOS-\u0438\u0433\u0440\u0443. \u041d\u0430 <a href=\"http:\/\/www.raywenderlich.com\/\">\u0441\u0430\u0439\u0442\u0435<\/a> \u0430\u0432\u0442\u043e\u0440\u0430 \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0443\u0440\u043e\u043a\u043e\u0432, \u043f\u0440\u0438\u0437\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043c\u043e\u0447\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0438\u0433\u0440.<\/i><\/p>\n<p>  \u0418\u0433\u0440\u0430, \u043d\u0430\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u0430. \u042d\u0442\u043e \u0433\u043e\u043d\u043a\u0430, \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0430\u043c\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043e\u0431\u0430\u043a\u0430 \u0438 \u0440\u0435\u0431\u0435\u043d\u043e\u043a. \u0422\u0430\u043f\u0430\u0439\u0442\u0435 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0431\u0435\u0434\u0438\u0442\u044c!<\/p>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0439 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u044b \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u043e\u0441\u043d\u043e\u0432\u0430\u043c\u0438 Cocos2D. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 Cocos2D-\u0443\u0440\u043e\u043a\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 <a href=\"http:\/\/www.raywenderlich.com\/tutorials\">\u0442\u0443\u0442<\/a>.<a name=\"habracut\"><\/a><\/p>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435:<\/b> \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 Game Center&#8217;\u0430 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438, \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c iOS-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u043c. \u0422\u0430\u043a\u0436\u0435 \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043e\u0434\u043d\u043e \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0435 iOS-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e (\u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u0434\u043d\u0430 \u043a\u043e\u043f\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u0432 \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0435, \u0430 \u0434\u0440\u0443\u0433\u0430\u044f \u043d\u0430 \u0434\u0435\u0432\u0430\u0439\u0441\u0435). \u0412 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0446\u043e\u0432, \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0434\u0432\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 Game Center-\u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f (\u043d\u0435 \u0432\u043e\u043b\u043d\u0443\u0439\u0442\u0435\u0441\u044c, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438\u0445 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e, \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0434\u0440\u0443\u0433\u043e\u0439 e-mail-\u0430\u0434\u0440\u0435\u0441).<\/p>\n<p>  \u0413\u043e\u0442\u043e\u0432\u044b? \u0422\u043e\u0433\u0434\u0430 \u041f\u041e\u0415\u0425\u0410\u041b\u0418!<\/p>\n<h5>\u0418\u0442\u0430\u043a, \u043d\u0430\u0447\u043d\u0451\u043c<\/h5>\n<p>  \u042d\u0442\u043e\u0442 \u0443\u0440\u043e\u043a \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u0443\u043b\u044c\u0442\u0438\u043f\u043b\u0435\u0435\u0440\u043d\u043e\u0439 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0439 \u0432 \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0438\u0433\u0440\u0443. \u0422\u0430\u043a \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043b\u043e\u0433\u0438\u043a\u0438 \u0438\u0433\u0440\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043d\u0435 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u0446\u0435\u043b\u044c \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0443\u0440\u043e\u043a\u0430, \u044f \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u0438\u043b <a href=\"http:\/\/d1xzuxjlafny7l.cloudfront.net\/downloads\/CatRaceStarter.zip\">\u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043a\u0443<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043e\u0434 \u0438\u0433\u0440\u044b \u0431\u0435\u0437 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0441\u0435\u0442\u044c\u044e.<\/p>\n<p>  \u0421\u043a\u0430\u0447\u0430\u0439\u0442\u0435 \u043a\u043e\u0434 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043f\u0440\u043e\u0435\u043a\u0442. \u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/cdn2.raywenderlich.com\/wp-content\/uploads\/2011\/04\/SimpleGameStarterCode.jpg\" alt=\"image\"\/><\/p>\n<p>  \u0418\u0433\u0440\u0430 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u0430, \u0438 \u043a\u043e\u0434 \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u0440\u043e\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d. \u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0435\u0433\u043e \u0438 \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u044c\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432\u0430\u043c \u0432\u0441\u0451 \u043f\u043e\u043d\u044f\u0442\u043d\u043e.<\/p>\n<h5>\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c Game Center<\/h5>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0438\u0433\u0440\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0438\u0433\u0440\u0430\u0442\u044c, \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0432 \u043d\u0435\u0451 \u043e\u0447\u0435\u043d\u044c \u0441\u043a\u0443\u0447\u043d\u043e \u0438\u0433\u0440\u0430\u0442\u044c \u043e\u0434\u043d\u043e\u043c\u0443! \u0411\u044b\u043b\u043e \u0431\u044b \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0432\u0435\u0441\u0435\u043b\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Game Center, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u0442\u044c \u0434\u0440\u0443\u0437\u0435\u0439 \u043f\u043e\u0438\u0433\u0440\u0430\u0442\u044c \u0441 \u0432\u0430\u043c\u0438 \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0438\u0441\u043a \u043c\u0430\u0442\u0447\u0435\u0439, \u0447\u0442\u043e\u0431\u044b \u0438\u0433\u0440\u0430\u0442\u044c \u0441\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c\u0438 \u043b\u044e\u0434\u044c\u043c\u0438. \u041d\u043e \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c, \u043a\u0430\u043a \u043d\u0430\u0447\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Game Center, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0432\u0435 \u0432\u0435\u0449\u0438:<\/p>\n<ol>\n<li>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c App ID;<\/li>\n<li>\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 iTunes Connect.<\/li>\n<\/ol>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0436\u0435 \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c.<\/p>\n<h5>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c App ID<\/h5>\n<p>  \u041f\u0435\u0440\u0432\u044b\u0439 \u0448\u0430\u0433 \u2014 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c App ID. \u0427\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e, \u0432\u043e\u0439\u0434\u0438\u0442\u0435 \u0432 <a href=\"http:\/\/developer.apple.com\/devcenter\/ios\/index.action\">iOS Dev Center<\/a>, \u0430 \u043e\u0442\u0442\u0443\u0434\u0430 \u2014 \u0432 iOS Provisioning Portal. \u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0432\u043a\u043b\u0430\u0434\u043a\u0443 App IDs \u0438 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 App ID \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0438 \u043d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/cdn5.raywenderlich.com\/wp-content\/uploads\/2011\/04\/CreateAppID.jpg\" alt=\"image\"\/><\/p>\n<p>  \u0421\u0430\u043c\u0430\u044f \u0432\u0430\u0436\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u2014 \u044d\u0442\u043e Bundle Identifier. \u042d\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 (\u0442\u043e \u0435\u0441\u0442\u044c, \u043e\u043d \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c \u0441 \u0442\u0435\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u044f!) \u0425\u043e\u0440\u043e\u0448\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043c\u0435\u043d\u0438, \u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0439 \u0438\u043c\u0435\u043d.<\/p>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u0432\u044b \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438, \u043d\u0430\u0436\u043c\u0438\u0442\u0435 Submit. \u0417\u0430\u0442\u0435\u043c \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u043f\u0440\u043e\u0435\u043a\u0442 Cat Race, \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 Resources\\Info.plist (<i>\u043f\u0440\u0438\u043c. \u043f\u0435\u0440.:<\/i> \u0432 \u043f\u043e\u0437\u0434\u043d\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 X\u0441ode \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043f\u0430\u043f\u043a\u0435 Supporting Files \u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f %\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435_\u043f\u0440\u043e\u0435\u043a\u0442\u0430%-Info.plist) \u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0435 Bundle Identifier \u043d\u0430 \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u043c\u0438 \u0432 iOS Provisioning Portal, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0438\u0436\u0435 (\u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0432\u0432\u043e\u0434\u0438\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435):<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/cdn2.raywenderlich.com\/wp-content\/uploads\/2011\/04\/SetBundleIdentifier.jpg\" alt=\"image\"\/><\/p>\n<p>  \u0418 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0432\u0435\u0449\u044c. \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0431\u044b\u043b\u043e \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0441\u0442\u0435\u0439 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b Xcode, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438:<\/p>\n<ul>\n<li>\u0423\u0434\u0430\u043b\u0438\u0442\u0435 \u0432\u0441\u0435 \u043a\u043e\u043f\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u0432\u0430\u0448\u0435\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438\u043b\u0438 \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0430;<\/li>\n<li>\u0412\u044b\u0439\u0434\u0438\u0442\u0435 \u0438\u0437 \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0430, \u0435\u0441\u043b\u0438 \u043e\u043d \u0437\u0430\u043f\u0443\u0449\u0435\u043d;<\/li>\n<li>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 Project\\Clean.<\/li>\n<\/ul>\n<p>  \u041f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e, \u0442\u0435\u043f\u0435\u0440\u044c \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c App ID \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0438 \u043e\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f! \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 iTunes Connect \u0438 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c Game Center.<\/p>\n<h5>\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 iTunes Connect<\/h5>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0448\u0430\u0433\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0432\u0445\u043e\u0434 \u0432 <a href=\"https:\/\/itunesconnect.apple.com\/WebObjects\/iTunesConnect.woa\">iTunes Connect<\/a> \u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b \u0432\u043e\u0448\u043b\u0438 \u0432 iTunes Connect, \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 Manage Your Applications, \u0437\u0430\u0442\u0435\u043c \u043a\u043b\u0438\u043a\u043d\u0438\u0442\u0435 \u043f\u043e \u0433\u043e\u043b\u0443\u0431\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u0435 Add New App \u0441\u0432\u0435\u0440\u0445\u0443 \u0441\u043b\u0435\u0432\u0430. \u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, SKU Number \u0438 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 Bundle ID, \u043f\u043e \u043f\u043e\u0434\u043e\u0431\u0438\u044e \u0440\u0430\u043d\u043d\u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0446\u0430, \u0442\u0430\u043a\u0436\u0435 \u043a\u0430\u043a \u0438 \u043d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/cdn2.raywenderlich.com\/wp-content\/uploads\/2011\/04\/CreateNewApp.jpg\" alt=\"image\"\/><\/p>\n<p>  \u041d\u0430\u0436\u043c\u0438\u0442\u0435 Continue \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438. \u041d\u0435 \u0432\u043e\u043b\u043d\u0443\u0439\u0442\u0435\u0441\u044c \u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043f\u043e\u043a\u0430 \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a \u0432\u0430\u0436\u043d\u043e, \u0432\u0435\u0434\u044c \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u044d\u0442\u043e \u043f\u043e\u0437\u0436\u0435. \u0410 \u0441\u0435\u0439\u0447\u0430\u0441 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0447\u0442\u043e-\u0442\u043e \u0432\u043d\u0435\u0441\u0442\u0438 (\u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0438\u043a\u043e\u043d\u043a\u0443 \u0438 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442), \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c iTunes Connect \u0441\u0447\u0430\u0441\u0442\u043b\u0438\u0432\u044b\u043c.<\/p>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u0432\u044b \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u0435, \u043d\u0430\u0436\u043c\u0438\u0442\u0435 Save, \u0438 \u0435\u0441\u043b\u0438 \u0432\u0441\u0451 \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u043a\u0430\u043a \u043d\u0430\u0434\u043e, \u0442\u043e \u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u00abPrepare for Upload\u00bb, \u043a\u0430\u043a \u043d\u0430 \u0441\u043a\u0440\u0438\u043d\u0435:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/cdn5.raywenderlich.com\/wp-content\/uploads\/2011\/04\/ManageGameCenterButton.jpg\" alt=\"image\"\/><\/p>\n<p>  \u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u0433\u043e\u043b\u0443\u0431\u0443\u044e \u043a\u043d\u043e\u043f\u043a\u0443 \u00abManage Game Center\u00bb \u0441\u043f\u0440\u0430\u0432\u0430 \u0441\u0432\u0435\u0440\u0445\u0443, \u0437\u0430\u0442\u0435\u043c \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u00abEnable\u00bb. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0438\u043a\u043d\u0438\u0442\u0435 \u00abDone\u00bb. \u0412\u043e\u0442 \u0438 \u0432\u0441\u0451, Game Center \u0432\u043a\u043b\u044e\u0447\u0435\u043d \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434!<\/p>\n<p>  \u041c\u0435\u0436\u0434\u0443 \u043f\u0440\u043e\u0447\u0438\u043c, \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u00abManage Game Center\u00bb, \u0432\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043f\u0438\u0441\u043a\u0430\u043c\u0438 \u043b\u0438\u0434\u0435\u0440\u043e\u0432 \u0438, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f\u043c\u0438. \u0412 \u044d\u0442\u043e\u043c \u0443\u0440\u043e\u043a\u0435 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u043d\u0438\u043c\u0438 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043d\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442.<\/p>\n<h5>\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0433\u0440\u043e\u043a\u0430: \u0442\u0435\u043e\u0440\u0438\u044f<\/h5>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u0438\u0433\u0440\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f, \u043f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0433\u0440\u043e\u043a\u0430. \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e. \u0412\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u044b\u0437\u0432\u0430\u0442\u044c authenticateWithCompletionHandler. \u041f\u043e \u0436\u0435\u043b\u0430\u043d\u0438\u044e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0439 \u0431\u043b\u043e\u043a \u043a\u043e\u0434\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0441\u044f \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<p>  \u041d\u043e \u0435\u0441\u0442\u044c \u043e\u0434\u043d\u0430 \u0443\u043b\u043e\u0432\u043a\u0430. \u0415\u0441\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0441\u043f\u043e\u0441\u043e\u0431 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Game Center, \u0437\u0430\u043b\u043e\u0433\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u043e\u0442\u0442\u0443\u0434\u0430 \u0438 \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 \u0432\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u0412\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0437\u043d\u0430\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f. \u041e\u0431 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c, \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0432\u0448\u0438\u0441\u044c \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u201cauthentication changed\u201d \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f. \u0418\u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0433\u0440\u043e\u043a\u0430 \u043d\u0443\u0436\u043d\u043e:<\/p>\n<ul>\n<li>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0438\u043d\u0433\u043b\u0442\u043e\u043d-\u043e\u0431\u044a\u0435\u043a\u0442 (<i>\u043f\u0440\u0438\u043c. \u043f\u0435\u0440.:<\/i> \u0441\u0438\u043d\u0433\u043b\u0442\u043e\u043d \u2014 \u044d\u0442\u043e \u0448\u0430\u0431\u043b\u043e\u043d \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0439, \u0447\u0442\u043e \u043a\u043b\u0430\u0441\u0441 \u0438\u043c\u0435\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440, \u0438 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0449\u0438\u0439 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044d\u0442\u043e\u043c\u0443 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0443), \u0447\u0442\u043e\u0431\u044b \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043a\u043e\u0434 Game Center&#8217;\u0430 \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435;<\/li>\n<li>\u041a\u043e\u0433\u0434\u0430 \u0441\u0438\u043d\u0433\u043b\u0442\u043e\u043d-\u043e\u0431\u044a\u0435\u043a\u0442 \u0441\u043e\u0437\u0434\u0430\u0441\u0442\u0441\u044f, \u043e\u043d \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u201cauthentication changed\u201d \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f;<\/li>\n<li>\u0418\u0433\u0440\u0430 \u0432\u044b\u0437\u043e\u0432\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 \u0441\u0438\u043d\u0433\u043b\u0442\u043e\u043d-\u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u0447\u0442\u043e\u0431\u044b \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0433\u0440\u043e\u043a\u0430;<\/li>\n<li>\u041a\u043e\u0433\u0434\u0430 \u0438\u0433\u0440\u043e\u043a \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0438\u043b\u0438 \u0432\u044b\u0445\u043e\u0434\u0438\u0442, \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u201cauthentication changed\u201d;<\/li>\n<li>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c, \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d \u043b\u0438 \u0438\u0433\u0440\u043e\u043a \u0432 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f.<\/li>\n<\/ul>\n<p>  <\/p>\n<h5>\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0433\u0440\u043e\u043a\u0430: \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h5>\n<p>  \u0412 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 Cat Race \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b, \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 iOS\\Cocoa Touch\\Objective-C class \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 Next. \u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0432 \u043f\u043e\u043b\u0435 Subclass NSObject, \u043d\u0430\u0436\u043c\u0438\u0442\u0435 Next \u0438 \u043d\u0430\u0437\u043e\u0432\u0438\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u043a\u0430\u043a GCHelper, \u043a\u043b\u0438\u043a\u043d\u0438\u0442\u0435 Finish. \u0414\u0430\u043b\u0435\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 GCHelper.h \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"objectivec\">#import &lt;Foundation\/Foundation.h&gt; #import &lt;GameKit\/GameKit.h&gt;  @interface GCHelper : NSObject {   BOOL gameCenterAvailable;   BOOL userAuthenticated; }  @property (assign, readonly) BOOL gameCenterAvailable;  + (GCHelper *)sharedInstance; - (void)authenticateLocalUser;  @end <\/code><\/pre>\n<p>  \u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b GameKit \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u0441 \u0434\u0432\u0443\u043c\u044f \u0431\u0443\u043b\u0435\u0432\u044b\u043c\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438. \u041e\u0434\u043d\u0430 \u0438\u0437 \u043d\u0438\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u0434\u043b\u044f \u0441\u043b\u0435\u0436\u0435\u043d\u0438\u044f \u0437\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 Game Center&#8217;\u0430, \u0430 \u0432\u0442\u043e\u0440\u0430\u044f \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u0438\u0433\u0440\u043e\u043a \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d.<\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f: \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u0433\u0440\u0430 \u0441\u043c\u043e\u0433\u043b\u0430 \u0441\u043e\u043e\u0431\u0449\u0438\u0442\u044c, \u0447\u0442\u043e Game Center \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d; \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0438 \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u043c\u0435\u0442\u043e\u0434, \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f).<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 GCHelper.m \u0438 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u0432\u043d\u0443\u0442\u0440\u0438 @implementation:<\/p>\n<pre><code class=\"objectivec\">@synthesize gameCenterAvailable;  #pragma mark Initialization  static GCHelper *sharedHelper = nil; + (GCHelper *) sharedInstance {   if (!sharedHelper) {       sharedHelper = [[GCHelper alloc] init];   }   return sharedHelper; } <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0441\u0438\u043d\u0442\u0435\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e gameCenterAvailable, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0437\u0430\u0434\u0430\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u043a\u043b\u0430\u0441\u0441\u0430. \u0417\u0430\u043c\u0435\u0447\u0443, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0438\u043d\u0433\u043b\u0442\u043e\u043d-\u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043d\u043e \u044d\u0442\u043e \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431, \u043a\u043e\u0433\u0434\u0430 \u0432\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0438\u0442\u044c\u0441\u044f \u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435 \u043f\u043e\u0442\u043e\u043a\u043e\u0432, \u043f\u044b\u0442\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0438\u043d\u0433\u043b\u0442\u043e\u043d \u0432 \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043c\u0435\u0442\u043e\u0434 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 sharedInstance:<\/p>\n<pre><code class=\"objectivec\">- (BOOL)isGameCenterAvailable {     \/\/ check for presence of GKLocalPlayer API     Class gcClass = (NSClassFromString(@&quot;GKLocalPlayer&quot;));       \/\/ check if the device is running iOS 4.1 or later     NSString *reqSysVer = @&quot;4.1&quot;;     NSString *currSysVer = [[UIDevice currentDevice] systemVersion];     BOOL osVersionSupported = ([currSysVer compare:reqSysVer          options:NSNumericSearch] != NSOrderedAscending);       return (gcClass && osVersionSupported); } <\/code><\/pre>\n<p>  \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0431\u044b\u043b \u0432\u0437\u044f\u0442 \u043f\u0440\u044f\u043c\u043e \u0438\u0437 <a href=\"http:\/\/developer.apple.com\/library\/ios\/#documentation\/NetworkingInternet\/Conceptual\/GameKit_Guide\/Introduction\/Introduction.html%23\/\/apple_ref\/doc\/uid\/TP40008304-CH1-SW1\">\u0433\u0430\u0439\u0434\u0430 Apple \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e Game Kit<\/a>. \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c Game Kit \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u043e\u043c\u0443, \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u043d\u0430 iOS 4.0 \u0438\u043b\u0438 \u0440\u0430\u043d\u0435\u0435 (\u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0435\u0437 \u043c\u0443\u043b\u044c\u0442\u0438\u043f\u043b\u0435\u0435\u0440\u0430).<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430:<\/p>\n<pre><code class=\"objectivec\">- (id)init {     if ((self = [super init])) {         gameCenterAvailable = [self isGameCenterAvailable];         if (gameCenterAvailable) {             NSNotificationCenter *nc =              [NSNotificationCenter defaultCenter];             [nc addObserver:self                     selector:@selector(authenticationChanged)                         name:GKPlayerAuthenticationDidChangeNotificationName                       object:nil];         }     }     return self; }   - (void)authenticationChanged {           if ([GKLocalPlayer localPlayer].isAuthenticated && !userAuthenticated) {        NSLog(@&quot;Authentication changed: player authenticated.&quot;);        userAuthenticated = TRUE;                } else if (![GKLocalPlayer localPlayer].isAuthenticated && userAuthenticated) {        NSLog(@&quot;Authentication changed: player not authenticated&quot;);        userAuthenticated = FALSE;     } } <\/code><\/pre>\n<p>  \u041c\u0435\u0442\u043e\u0434 init \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c Game Center&#8217;\u0430, \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u201cauthentication changed\u201d. \u0412\u0430\u0436\u043d\u043e, \u0447\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u0434 \u043f\u043e\u043f\u044b\u0442\u043a\u043e\u0439 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043e\u043d\u043e \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 authenticationChanged \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u0430: \u043e\u043d\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d \u043b\u0438 \u0431\u044b\u043b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u043c\u0435\u043d\u044b \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f, \u0438 \u043c\u0435\u043d\u044f\u0435\u0442 \u0444\u043b\u0430\u0433 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/p>\n<p>  \u041e\u0442\u043c\u0435\u0447\u0443, \u0447\u0442\u043e \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u043f\u043e\u0434\u0440\u044f\u0434 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043b\u0438 \u0432\u044b\u0445\u043e\u0434\u0430, \u0447\u0442\u043e\u0431\u044b \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u0438\u0442\u044c\u0441\u044f, \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0444\u043b\u0430\u0433 userAuthenticated \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0441\u0442\u0430\u0442\u0443\u0441\u0430, \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0431\u044b\u043b\u0438 \u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u043f\u0443\u0441\u0442\u044f \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0432\u0440\u0435\u043c\u044f.<\/p>\n<p>  \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0433\u0440\u043e\u043a\u0430 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 authenticationChanged:<\/p>\n<pre><code class=\"objectivec\">#pragma mark User functions   - (void)authenticateLocalUser {        if (!gameCenterAvailable) return;       NSLog(@&quot;Authenticating local user...&quot;);     if ([GKLocalPlayer localPlayer].authenticated == NO) {              [[GKLocalPlayer localPlayer] authenticateWithCompletionHandler:nil];             } else {         NSLog(@&quot;Already authenticated!&quot;);     } } <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 authenticateWithCompletionHandler, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442 \u043f\u043e\u0437\u0434\u043d\u0435\u0435. \u041e\u043d \u0441\u043b\u0443\u0436\u0438\u0442 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u043e\u0431\u0449\u0438\u0442\u044c Game Kit&#8217;\u0443 \u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0433\u0440\u043e\u043a\u0430. \u0417\u0430\u043c\u0435\u0447\u0443, \u0447\u0442\u043e \u043e\u043d \u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 completion handler. \u0421 \u0442\u0435\u0445 \u043f\u043e\u0440, \u043a\u0430\u043a \u0432\u044b \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u201cauthentication changed\u201d \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f, \u044d\u0442\u043e \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<p>  \u041e\u043a\u0435\u0439, \u0442\u0435\u043f\u0435\u0440\u044c GCHelper \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432\u0435\u0441\u044c \u043a\u043e\u0434, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0433\u0440\u043e\u043a\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e! \u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u0441\u044c \u043d\u0430 AppDelegate.m \u0438 \u0441\u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"objectivec\">\/\/ \u0412 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 \u0444\u0430\u0439\u043b\u0430 #import &quot;GCHelper.h&quot;   \/\/ \u0412 \u043a\u043e\u043d\u0446\u0435 applicationDidFinishLaunching, \u0441\u0440\u0430\u0437\u0443 \u043f\u0435\u0440\u0435\u0434 \/\/ \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 runWithScene: [[GCHelper sharedInstance] authenticateLocalUser]; <\/code><\/pre>\n<p>  \u042d\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 (\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u201cauthentication changed\u201d \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438), \u0437\u0430\u0442\u0435\u043c \u0432\u044b\u0437\u043e\u0432\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 authenticateLocalUser.<\/p>\n<p>  \u041f\u043e\u0447\u0442\u0438 \u0433\u043e\u0442\u043e\u0432\u043e! \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0448\u0430\u0433 \u2014 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a Game Kit \u0432 \u043f\u0440\u043e\u0435\u043a\u0442. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u0440\u043e\u0435\u043a\u0442 Cat Race \u0441\u043b\u0435\u0432\u0430 \u0441\u0432\u0435\u0440\u0445\u0443 \u0432\u043a\u043b\u0430\u0434\u043a\u0438 Groups &#038; Files, \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 \u043a\u043b\u0430\u0434\u043a\u0443 Build Phases, \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0438\u0442\u0435 \u201cLink Binary with Libraries\u201d \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 &quot;+&quot;. \u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 GameKit.framework \u0438 \u043a\u043b\u0438\u043a\u043d\u0438\u0442\u0435 Add. \u0421\u043c\u0435\u043d\u0438\u0442\u0435 \u0442\u0438\u043f \u0441 Required \u043d\u0430 Optional, \u0438 \u0432\u0430\u0448 \u044d\u043a\u0440\u0430\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/cdn5.raywenderlich.com\/wp-content\/uploads\/2011\/04\/AddingGameKitFramework.jpg\" alt=\"image\"\/><\/p>\n<p>  \u0412\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u044d\u0442\u043e! \u0421\u043e\u0431\u0435\u0440\u0438\u0442\u0435 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043f\u0440\u043e\u0435\u043a\u0442, \u0438 \u0435\u0441\u043b\u0438 \u0432\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0438 \u0432\u0445\u043e\u0434 \u0432 Game Center, \u0442\u043e \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/cdn1.raywenderlich.com\/wp-content\/uploads\/2011\/04\/LocalUserAuthenticated.jpg\" alt=\"image\"\/><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u0438\u0433\u0440\u043e\u043a\u0430, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u0440\u0430\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430\u0439\u0442\u0438 \u043a\u043e\u0433\u043e-\u043d\u0438\u0431\u0443\u0434\u044c, \u0441 \u043a\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0438\u0433\u0440\u0430\u0442\u044c!<\/p>\n<h5>Game Center, Game Center, \u0441\u0434\u0435\u043b\u0430\u0439 \u043c\u043d\u0435 \u043c\u0430\u0442\u0447<\/h5>\n<p>  \u0415\u0441\u0442\u044c \u0434\u0432\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u0430, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0439\u0442\u0438 \u043a\u043e\u0433\u043e-\u043d\u0438\u0431\u0443\u0434\u044c, \u0441 \u043a\u0435\u043c \u043f\u043e\u0438\u0433\u0440\u0430\u0442\u044c, \u0447\u0435\u0440\u0435\u0437 Game Center. \u042d\u0442\u043e \u043f\u043e\u0438\u0441\u043a \u043c\u0430\u0442\u0447\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u0430\u0442\u0447\u0435\u0439.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u0443\u0440\u043e\u043a\u0435 \u0432\u044b \u0438\u0437\u0443\u0447\u0438\u0442\u0435 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u0430\u0442\u0447\u0435\u0439. \u0418\u0434\u0435\u044f \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u043c\u0430\u0442\u0447, \u0432\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432 \u043e\u0431\u044a\u0435\u043a\u0442 GKMatchRequest, \u0437\u0430\u0442\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0435 \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 GKMatchmakerViewController&#8217;\u0430.<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u043d\u0435\u0441\u0451\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0430\u0432\u043a\u0438 \u0432 CGHelper.h:<\/p>\n<pre><code class=\"objectivec\">\/\/ \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u043d\u0430\u0447\u0430\u043b\u043e \u0444\u0430\u0439\u043b\u0430 @protocol GCHelperDelegate  - (void)matchStarted; - (void)matchEnded; - (void)match:(GKMatch *)match didReceiveData:(NSData *)data      fromPlayer:(NSString *)playerID; @end   \/\/ \u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0443 @interface \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c @interface GCHelper : NSObject &lt;GKMatchmakerViewControllerDelegate, GKMatchDelegate&gt; {   \/\/ \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432\u043d\u0443\u0442\u0440\u044c @interface UIViewController *presentingViewController; GKMatch *match; BOOL matchStarted; id &lt;GCHelperDelegate&gt; delegate;   \/\/ \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043f\u043e\u0441\u043b\u0435 @interface @property (retain) UIViewController *presentingViewController; @property (retain) GKMatch *match; @property (assign) id &lt;GCHelperDelegate&gt; delegate;   - (void)findMatchWithMinPlayers:(int)minPlayers maxPlayers:(int)maxPlayers      viewController:(UIViewController *)viewController      delegate:(id&lt;GCHelperDelegate&gt;)theDelegate; <\/code><\/pre>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u043e\u0439\u0434\u0451\u043c\u0441\u044f \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u043a\u043e\u0434\u0443.<\/p>\n<ul>\n<li>\u0412\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b GCHelperDelegate, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u0443\u0432\u0435\u0434\u043e\u043c\u0438\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u043e \u0432\u0430\u0436\u043d\u044b\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a: \u043d\u0430\u0447\u0430\u043b\u043e \u043c\u0430\u0442\u0447\u0430, \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0435 \u0438\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u044d\u0442\u043e\u0439 \u0438\u0433\u0440\u0435 \u0432\u0430\u0448 Cocos2D \u0441\u043b\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b;<\/li>\n<li>\u041e\u0431\u044a\u0435\u043a\u0442 GCHelper \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0434\u0432\u0430 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430. \u041f\u0435\u0440\u0432\u044b\u0439 \u0441\u043b\u0443\u0436\u0438\u0442 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u0430\u0442\u0447\u0435\u0439 \u043c\u043e\u0433 \u0443\u0432\u0435\u0434\u043e\u043c\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043e\u0431\u044a\u0435\u043a\u0442, \u043a\u043e\u0433\u0434\u0430 \u043c\u0430\u0442\u0447 \u043d\u0430\u0439\u0434\u0435\u043d \u0438\u043b\u0438 \u043d\u0435\u0442. \u0410 \u0432\u0442\u043e\u0440\u043e\u0439 \u2014 \u0447\u0442\u043e\u0431\u044b Game Center \u043c\u043e\u0433 \u0443\u0432\u0435\u0434\u043e\u043c\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043e\u0431\u044a\u0435\u043a\u0442, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u044b \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f \u0441\u0442\u0430\u0442\u0443\u0441 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f;<\/li>\n<li>\u0421\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430, \u0447\u0442\u043e\u0431\u044b \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 view controller&#8217;\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u0430\u0442\u0447\u0435\u0439. \u0410 \u0442\u0430\u043a\u0436\u0435 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043c\u0430\u0442\u0447, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0437\u043d\u0430\u0442\u044c, \u043d\u0430\u0447\u0430\u043b\u0441\u044f \u043b\u0438 \u043c\u0430\u0442\u0447 \u0438\u043b\u0438 \u043d\u0435\u0442, \u0438 \u0434\u0435\u043b\u0435\u0433\u0430\u0442;<\/li>\n<li>\u0421\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u043c\u0435\u0442\u043e\u0434, \u0447\u0442\u043e\u0431\u044b Cocos2D \u0441\u043b\u043e\u0439 \u043c\u043e\u0433 \u043d\u0430\u0439\u0442\u0438 \u043a\u043e\u0433\u043e-\u043d\u0438\u0431\u0443\u0434\u044c, \u0441 \u043a\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0438\u0433\u0440\u0430\u0442\u044c.<\/li>\n<\/ul>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u0441\u044c \u043d\u0430 GCHelper.m \u0438 \u0432\u043d\u0435\u0441\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"objectivec\">\/\/ \u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u0444\u0430\u0439\u043b\u0430 @synthesize presentingViewController; @synthesize match; @synthesize delegate;   \/\/ \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 \u043c\u0435\u0442\u043e\u0434, \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 authenticateLocalUser - (void)findMatchWithMinPlayers:(int)minPlayers maxPlayers:(int)maxPlayers        viewController:(UIViewController *)viewController      delegate:(id&lt;GCHelperDelegate&gt;)theDelegate {       if (!gameCenterAvailable) return;       matchStarted = NO;     self.match = nil;     self.presentingViewController = viewController;     delegate = theDelegate;                    [presentingViewController dismissModalViewControllerAnimated:NO];       GKMatchRequest *request = [[[GKMatchRequest alloc] init] autorelease];      request.minPlayers = minPlayers;          request.maxPlayers = maxPlayers;       GKMatchmakerViewController *mmvc =          [[[GKMatchmakerViewController alloc] initWithMatchRequest:request] autorelease];         mmvc.matchmakerDelegate = self;       [presentingViewController presentModalViewController:mmvc animated:YES]; } <\/code><\/pre>\n<p>  \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u043b\u043e\u0435\u043c Cocos2D \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043c\u0430\u0442\u0447\u0430. \u0415\u0441\u043b\u0438 \u0436\u0435 Game Center \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d, \u0442\u043e \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442.<\/p>\n<p>  \u041e\u043d \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043c\u0430\u0442\u0447 \u043a\u0430\u043a \u0435\u0449\u0435 \u043d\u0435 \u043d\u0430\u0447\u0430\u0432\u0448\u0438\u0439\u0441\u044f \u0438 \u043e\u0431\u044a\u0435\u043a\u0442 \u043c\u0430\u0442\u0447\u0430 \u043a\u0430\u043a nil. \u041e\u043d \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0441\u043d\u0430\u0440\u0443\u0436\u0438 view controller \u0438 \u0434\u0435\u043b\u0435\u0433\u0430\u0442 \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043e\u0442\u043c\u0435\u043d\u044f\u0435\u0442 \u043b\u044e\u0431\u043e\u0439 view controller, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0432\u0448\u0438\u0439 \u0434\u043e \u043d\u0435\u0433\u043e (\u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 GKMatchmakerViewController \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f).<\/p>\n<p>  \u0417\u0430\u0442\u0435\u043c \u0438\u0434\u0435\u0442 \u0432\u0430\u0436\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c. \u041e\u0431\u044a\u0435\u043a\u0442 GKMatchRequest \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0434\u0430\u0442\u044c \u0442\u0438\u043f \u043c\u0430\u0442\u0447\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u0438\u0449\u0435\u0442\u0435, \u0442\u0430\u043a\u043e\u0439 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u0433\u0440\u043e\u043a\u043e\u0432. \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0438\u0445 \u0442\u0430\u043a\u0438\u043c\u0438, \u043a\u0430\u043a\u0438\u043c\u0438 \u043e\u043d\u0438 \u0431\u044b\u043b\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u044b \u0432 \u043d\u0435\u0433\u043e (\u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0438\u0433\u0440\u044b \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u2014 2 \u0438\u0433\u0440\u043e\u043a\u0430, \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u2014 \u0442\u043e\u0436\u0435 2 \u0438\u0433\u0440\u043e\u043a\u0430).<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043e\u043d \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 GKMatchmakerViewController&#8217;\u0430 \u0441 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c (<i>\u043f\u0440\u0438\u043c. \u043f\u0435\u0440.:<\/i> \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u043c GKMatchRequest), \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0434\u0435\u043b\u0435\u0433\u0430\u0442\u043e\u043c \u043e\u0431\u044a\u0435\u043a\u0442 GCHelper \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0439 view controller \u043d\u0430 \u044d\u043a\u0440\u0430\u043d.<\/p>\n<p>  \u0421 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f GKMatchmakerViewController&#8217;\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043d\u0430\u0439\u0442\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u0438\u0433\u0440\u043e\u043a\u0430 \u0438 \u043d\u0430\u0447\u0430\u0442\u044c \u0438\u0433\u0440\u0443. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0437\u0432\u0430\u043d\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0438\u0445:<\/p>\n<pre><code class=\"objectivec\">#pragma mark GKMatchmakerViewControllerDelegate   \/\/ \u0418\u0433\u0440\u043e\u043a \u043e\u0442\u043a\u043b\u043e\u043d\u0438\u043b \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u0430\u0442\u0447\u0430 - (void)matchmakerViewControllerWasCancelled:(GKMatchmakerViewController *)viewController {     [presentingViewController dismissModalViewControllerAnimated:YES]; }   \/\/ \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u0430\u0442\u0447\u0430 \u0432\u044b\u043b\u0435\u0442\u0435\u043b\u043e \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439 - (void)matchmakerViewController:(GKMatchmakerViewController *)viewController didFailWithError:(NSError *)error {     [presentingViewController dismissModalViewControllerAnimated:YES];     NSLog(@&quot;Error finding match: %@&quot;, error.localizedDescription);     }   \/\/ \u041c\u0430\u0442\u0447 \u043d\u0430\u0439\u0434\u0435\u043d, \u0438\u0433\u0440\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u043d\u0430\u0447\u0430\u0442\u044c\u0441\u044f - (void)matchmakerViewController:(GKMatchmakerViewController *)viewController didFindMatch:(GKMatch *)theMatch {     [presentingViewController dismissModalViewControllerAnimated:YES];     self.match = theMatch;     match.delegate = self;     if (!matchStarted && match.expectedPlayerCount == 0) {         NSLog(@&quot;Ready to start match!&quot;);     } } <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0438\u0433\u0440\u043e\u043a \u043e\u0442\u043c\u0435\u043d\u0438\u0442 \u043f\u043e\u0438\u0441\u043a \u043c\u0430\u0442\u0447\u0430, \u0438\u043b\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430, \u0442\u043e \u0432\u0438\u0434 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u0430\u0442\u0447\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043a\u0440\u043e\u0435\u0442\u0441\u044f.<\/p>\n<p>  \u0410 \u0435\u0441\u043b\u0438 \u043c\u0430\u0442\u0447 \u043d\u0430\u0439\u0434\u0435\u043d, \u0442\u043e \u043e\u043d \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u043c\u0430\u0442\u0447\u0430 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442 GCHelper \u0434\u0435\u043b\u0435\u0433\u0430\u0442\u043e\u043c \u0434\u0435\u043b\u0435\u0433\u0430\u0442\u043e\u043c \u043c\u0430\u0442\u0447\u0430, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u043c\u043e\u0433 \u0431\u044b\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d \u043e \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0449\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043e\u043d \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u043f\u0440\u0438\u0448\u043b\u043e \u043b\u0438 \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u043c\u0430\u0442\u0447. \u041e\u0431\u044a\u0435\u043a\u0442 \u043c\u0430\u0442\u0447\u0430 \u0445\u0440\u0430\u043d\u0438\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u0433\u0440\u043e\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 expectedPlayerCount. \u0415\u0441\u043b\u0438 \u043e\u043d\u0430 \u0440\u0430\u0432\u043d\u0430 0, \u0442\u043e \u0432\u0441\u0435 \u0433\u043e\u0442\u043e\u0432\u044b \u043d\u0430\u0447\u0430\u0442\u044c. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0432\u0435\u0434\u0435\u043c \u044d\u0442\u043e \u0432 \u043b\u043e\u0433, \u043f\u043e\u0437\u0434\u043d\u0435\u0435 \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0437\u0434\u0435\u0441\u044c \u043a\u043e\u0435-\u0447\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435, \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 GKMatchDelegate:<\/p>\n<pre><code class=\"objectivec\">#pragma mark GKMatchDelegate   \/\/ \u041e\u0431\u044a\u0435\u043a\u0442 \u043c\u0430\u0442\u0447\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0442 \u0438\u0433\u0440\u043e\u043a\u0430 - (void)match:(GKMatch *)theMatch didReceiveData:(NSData *)data fromPlayer:(NSString *)playerID {         if (match != theMatch) return;       [delegate match:theMatch didReceiveData:data fromPlayer:playerID]; }   \/\/ \u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0438\u0433\u0440\u043e\u043a\u0430 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u043b\u0441\u044f, \u043e\u0442\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u043b\u0441\u044f) - (void)match:(GKMatch *)theMatch player:(NSString *)playerID didChangeState:(GKPlayerConnectionState)state {        if (match != theMatch) return;       switch (state) {         case GKPlayerStateConnected:              \/\/ handle a new player connection.             NSLog(@&quot;Player connected!&quot;);               if (!matchStarted && theMatch.expectedPlayerCount == 0) {                 NSLog(@&quot;Ready to start match!&quot;);             }               break;          case GKPlayerStateDisconnected:             \/\/ a player just disconnected.              NSLog(@&quot;Player disconnected!&quot;);             matchStarted = NO;             [delegate matchEnded];             break;     }                      }   \/\/ \u041e\u0431\u044a\u0435\u043a\u0442 \u043c\u0430\u0442\u0447\u0430 \u043d\u0435 \u0441\u043c\u043e\u0433 \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u0441 \u0438\u0433\u0440\u043e\u043a\u043e\u043c \u0438\u0437-\u0437\u0430 \u043e\u0448\u0438\u0431\u043a\u0438 - (void)match:(GKMatch *)theMatch connectionWithPlayerFailed:(NSString *)playerID withError:(NSError *)error {       if (match != theMatch) return;       NSLog(@&quot;Failed to connect to player with error: %@&quot;, error.localizedDescription);     matchStarted = NO;     [delegate matchEnded]; }   \/\/ \u041c\u0430\u0442\u0447 \u043d\u0435 \u0441\u043c\u043e\u0433 \u043d\u0430\u0447\u0430\u0442\u044c\u0441\u044f \u0438\u0437-\u0437\u0430 \u043e\u0448\u0438\u0431\u043a\u0438 - (void)match:(GKMatch *)theMatch didFailWithError:(NSError *)error {       if (match != theMatch) return;       NSLog(@&quot;Match failed with error: %@&quot;, error.localizedDescription);     matchStarted = NO;     [delegate matchEnded]; } <\/code><\/pre>\n<p>  match:didReceiveData:fromPlayer \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u0438\u0433\u0440\u043e\u043a \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0435. \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0434\u0435\u043b\u0435\u0433\u0430\u0442 (\u0432 \u044d\u0442\u043e\u0439 \u0438\u0433\u0440\u0435 \u0438\u043c \u0431\u0443\u0434\u0435\u0442 Cocos2D \u0441\u043b\u043e\u0439), \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0438\u0445 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0432\u0438\u0436\u043e\u043a \u0438\u0433\u0440\u044b.<\/p>\n<p>  match:player:didChangState \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u0434\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0438 \u0438\u0433\u0440\u043e\u043a\u0430 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u0432\u0441\u0435 \u043b\u0438 \u0438\u0433\u0440\u043e\u043a\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u044b, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u0447\u0430\u0442\u044c \u043c\u0430\u0442\u0447. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0438\u0433\u0440\u043e\u043a \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u043b\u0441\u044f, \u0442\u043e \u043c\u0430\u0442\u0447 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u0432 \u0434\u0435\u043b\u0435\u0433\u0430\u0442.<\/p>\n<p>  \u041e\u043a\u0435\u0439, \u0442\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043a\u043e\u0434 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u0430\u0442\u0447\u0430, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0435\u0433\u043e \u0432 \u043d\u0430\u0448\u0435\u043c HelloWorldLayer&#8217;e. \u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u0441\u044c \u043d\u0430 HelloWorldLayer.h \u0438 \u0432\u043d\u0435\u0441\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"objectivec\">\/\/ \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u043d\u0430\u0447\u0430\u043b\u043e \u0444\u0430\u0439\u043b\u0430 #import &quot;GCHelper.h&quot;   \/\/ \u041e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043c @interface \u043a\u0430\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0439 GCHelperDelegate @interface HelloWorldLayer : CCLayer &lt;GCHelperDelegate&gt; <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u0441\u044c \u043d\u0430 HelloWorldLayer.m \u0438 \u0432\u043d\u0435\u0441\u0438\u0442\u0435 \u0442\u0430\u043a\u0438\u0435 \u043f\u043e\u043f\u0440\u0430\u0432\u043a\u0438:<\/p>\n<pre><code class=\"objectivec\">\/\/ \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u043d\u0430\u0447\u0430\u043b\u043e \u0444\u0430\u0439\u043b\u0430 #import &quot;AppDelegate.h&quot; #import &quot;RootViewController.h&quot;   \/\/ \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u043a\u043e\u043d\u0435\u0446 \u043c\u0435\u0442\u043e\u0434\u0430 init, \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 setGameState AppDelegate * delegate = (AppDelegate *) [UIApplication sharedApplication].delegate;                 [[GCHelper sharedInstance] findMatchWithMinPlayers:2 maxPlayers:2 viewController:delegate.viewController delegate:self];   \/\/ \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043d\u043e\u0432\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0432 \u043a\u043e\u043d\u0435\u0446 \u0444\u0430\u0439\u043b\u0430 #pragma mark GCHelperDelegate   - (void)matchStarted {         CCLOG(@&quot;Match started&quot;);         }   - (void)matchEnded {         CCLOG(@&quot;Match ended&quot;);     }   - (void)match:(GKMatch *)match didReceiveData:(NSData *)data fromPlayer:(NSString *)playerID {     CCLOG(@&quot;Received data&quot;); } <\/code><\/pre>\n<p>  \u0421\u0430\u043c\u0430\u044f \u0432\u0430\u0436\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0437\u0434\u0435\u0441\u044c \u2014 \u044d\u0442\u043e \u043c\u0435\u0442\u043e\u0434 init. \u041e\u043d \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 RootViewController \u0438\u0437 App Delegate, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044d\u0442\u043e\u0442 view controller \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c view controller \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u0430\u0442\u0447\u0430. \u0414\u0430\u043b\u0435\u0435, \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043c\u0430\u0442\u0447\u0430, \u043f\u0443\u0442\u0435\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f view controller&#8217;\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u0430\u0442\u0447\u0430. \u042d\u0442\u043e \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0432 GCHelper&#8217;\u0435.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0438\u0434\u0443\u0442 \u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043d\u0430\u0447\u0430\u043b\u0430 \u0438\u043b\u0438 \u043a\u043e\u043d\u0446\u0430 \u043c\u0430\u0442\u0447\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0435 \u043f\u043e\u0437\u0434\u043d\u0435\u0435.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0432\u0435\u0449\u044c. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0448\u0430\u0431\u043b\u043e\u043d Cocos2D \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0434\u043b\u044f RootViewController&#8217;\u0430 \u0432 App Delegate, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0435\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c. \u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u0441\u044c \u043d\u0430 AppDelegate.h \u0438 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"objectivec\">@property (nonatomic, retain) RootViewController *viewController; <\/code><\/pre>\n<p>  \u0421\u0438\u043d\u0442\u0435\u0437\u0438\u0440\u0443\u0439\u0442\u0435 \u0435\u0433\u043e \u0432 AppDelegate.m:<\/p>\n<pre><code class=\"objectivec\">@synthesize viewController; <\/code><\/pre>\n<p>  \u0413\u043e\u0442\u043e\u0432\u043e! \u0421\u043e\u0431\u0435\u0440\u0438\u0442\u0435 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0438 \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u043a\u0430\u043a \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f view controller \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u0430\u0442\u0447\u0430:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/cdn5.raywenderlich.com\/wp-content\/uploads\/2011\/04\/GKMatchmakerViewController.jpg\" alt=\"image\"\/><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435, \u0447\u0442\u043e\u0431\u044b \u0443 \u0432\u0430\u0441 \u0431\u044b\u043b\u043e \u0434\u0432\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043f\u0438\u0438 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u044d\u0442\u043e \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440 \u0438 \u0432\u0430\u0448 iPhone).<\/p>\n<p>  <b>\u0412\u0430\u0436\u043d\u043e:<\/b> \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0440\u0430\u0437\u043d\u044b\u0435 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u044b Game Center&#8217;a \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435, \u0432 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0432\u044b\u0439\u0434\u0435\u0442.<\/p>\n<p>  \u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u00abPlay Now\u00bb \u043d\u0430 \u043e\u0431\u043e\u0438\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445 \u0438, \u043f\u043e\u0441\u043b\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, view controller \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u0430\u0442\u0447\u0430 \u0438\u0441\u0447\u0435\u0437\u043d\u0435\u0442, \u0438 \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 \u0432 \u043b\u043e\u0433\u0435:<\/p>\n<pre><code class=\"objectivec\">CatRace[16440:207] Authentication changed: player authenticated. CatRace[16440:207] Player connected! CatRace[16440:207] Ready to start match! <\/code><\/pre>\n<p>  \u041f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e! \u0412\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043c\u0430\u0442\u0447 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438! \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u043d\u0430 \u043f\u0443\u0442\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0438\u0433\u0440\u044b!<\/p>\n<h5>\u041b\u0430\u043d\u0434\u0448\u0430\u0444\u0442\u043d\u0430\u044f \u043e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0438 GKMatchmakerViewController<\/h5>\n<p>  \u0412\u044b \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438, \u0447\u0442\u043e \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e GKMatchmakerViewController \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u043f\u043e\u0440\u0442\u043d\u0435\u0442\u043d\u043e\u0439 \u043e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u0438. \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0440\u0430\u0437\u0434\u0440\u0430\u0436\u0430\u0435\u0442, \u0432\u0435\u0434\u044c \u044d\u0442\u0430 Cocos2D \u0438\u0433\u0440\u0430 \u0432 \u043b\u0430\u043d\u0434\u0448\u0430\u0444\u0442\u043d\u043e\u0439!<\/p>\n<p>  \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e, \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0432 GKMatchmakerViewController \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u0430\u043d\u0434\u0448\u0430\u0444\u0442\u043d\u044b\u0435 \u043e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u0438. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b, \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 iOS\\Cocoa Touch\\Objective-C class \u0438 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441 NSObject&#8217;\u0430 \u043f\u043e\u0434 \u0438\u043c\u0435\u043d\u0435\u043c GKMatchmakerViewController-LandscapeOnly.<\/p>\n<p>  \u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 GKMatchmakerViewController-LandscapeOnly.h \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"objectivec\">#import &lt;Foundation\/Foundation.h&gt; #import &lt;GameKit\/GameKit.h&gt;   @interface GKMatchmakerViewController(LandscapeOnly) - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation; @end <\/code><\/pre>\n<p>  \u0410 \u0437\u0430\u0442\u0435\u043c \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 GKMatchmakerViewController-LandscapeOnly.m:<\/p>\n<pre><code class=\"objectivec\">#import &quot;GKMatchmakerViewController-LandscapeOnly.h&quot;   @implementation GKMatchmakerViewController (LandscapeOnly)   - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {      return ( UIInterfaceOrientationIsLandscape( interfaceOrientation ) ); }   @end <\/code><\/pre>\n<p>  \u0418 \u0432\u0441\u0451! \u0421\u043e\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0435\u0433\u043e. \u0422\u0435\u043f\u0435\u0440\u044c view controller \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c\u0441\u044f \u0432 \u043b\u0430\u043d\u0434\u0448\u0430\u0444\u0442\u043d\u043e\u043c \u0432\u0438\u0434\u0435:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/cdn4.raywenderlich.com\/wp-content\/uploads\/2011\/04\/GKMatchmakerViewController-Landscape.jpg\" alt=\"image\"\/><\/p>\n<h5>\u0427\u0442\u043e \u0436\u0435 \u0434\u0430\u043b\u044c\u0448\u0435?<\/h5>\n<p>  \u0412\u043e\u0442 <a href=\"http:\/\/d1xzuxjlafny7l.cloudfront.net\/downloads\/CatRacePart1.zip\">\u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a> \u0441\u043e \u0432\u0441\u0435\u043c \u043a\u043e\u0434\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043d \u0432 \u044d\u0442\u043e\u043c \u0443\u0440\u043e\u043a\u0435.<\/p>\n<p>  \u0412\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u0438\u0437\u0443\u0447\u0438\u043c, \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u0435\u0436\u0434\u0443 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438, \u0438 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043c \u0438\u0433\u0440\u0443 \u0432 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0433\u043e\u043d\u043a\u0443 \u043a\u043e\u0448\u043a\u0430 vs \u0440\u0435\u0431\u0435\u043d\u043e\u043a!        \t\t   \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/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=\"http:\/\/habrahabr.ru\/post\/173449\/\"> http:\/\/habrahabr.ru\/post\/173449\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">       <img decoding=\"async\" src=\"http:\/\/img23.binimage.org\/55\/70\/07\/macgamecenter.png\" alt=\"image\"\/><\/p>\n<p>  <i>\u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0430 \u043f\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043c\u0443\u043b\u044c\u0442\u0438\u043f\u043b\u0435\u0435\u0440\u0430 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Game Center \u0432 iOS-\u0438\u0433\u0440\u0443. \u041d\u0430 <a href=\"http:\/\/www.raywenderlich.com\/\">\u0441\u0430\u0439\u0442\u0435<\/a> \u0430\u0432\u0442\u043e\u0440\u0430 \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0443\u0440\u043e\u043a\u043e\u0432, \u043f\u0440\u0438\u0437\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043c\u043e\u0447\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0438\u0433\u0440.<\/i><\/p>\n<p>  \u0418\u0433\u0440\u0430, \u043d\u0430\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u0430. \u042d\u0442\u043e \u0433\u043e\u043d\u043a\u0430, \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0430\u043c\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043e\u0431\u0430\u043a\u0430 \u0438 \u0440\u0435\u0431\u0435\u043d\u043e\u043a. \u0422\u0430\u043f\u0430\u0439\u0442\u0435 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0431\u0435\u0434\u0438\u0442\u044c!<\/p>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0439 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u044b \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u043e\u0441\u043d\u043e\u0432\u0430\u043c\u0438 Cocos2D. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 Cocos2D-\u0443\u0440\u043e\u043a\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 <a href=\"http:\/\/www.raywenderlich.com\/tutorials\">\u0442\u0443\u0442<\/a>.<\/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-173449","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/173449","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=173449"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/173449\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=173449"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=173449"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=173449"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}