{"id":118115,"date":"2020-09-15T16:55:52","date_gmt":"2020-09-15T16:55:52","guid":{"rendered":"https:\/\/developer.apple.com\/news\/?id=hk2u622s"},"modified":"2020-09-15T16:55:52","modified_gmt":"2020-09-15T16:55:52","slug":"support-game-controllers-in-your-app","status":"publish","type":"post","link":"https:\/\/sickgaming.net\/blog\/2020\/09\/15\/support-game-controllers-in-your-app\/","title":{"rendered":"Support game controllers in your app"},"content":{"rendered":"<div class=\"inline-article-image\"><img decoding=\"async\" src=\"https:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2020\/09\/support-game-controllers-in-your-app.jpg\" data-hires=\"false\"><\/div>\n<p>Level up your apps and games with the Game Controller framework and easily build in support for popular console game controllers and MFi accessories on iPhone, iPad, Mac, and Apple TV. The precise control and tactile feedback provided by a game controller can deepen the player\u2019s sense of immersion and enhance their gameplay experience. And now it\u2019s easier than ever to help players discover which games support controllers.<\/p>\n<p>With Xcode 12, you can indicate game controller support right when building your app. By indicating controller support, your App Store product page will display controller badging, and your app will be able to access controller input re-mapping options in Settings.<\/p>\n<h3>How to add support for game controllers in Xcode 12<\/h3>\n<p>To indicate controller support, follow a few simple steps:<\/p>\n<ol>\n<li>Open your <strong>Xcode project<\/strong>.<\/li>\n<li>Navigate to the <strong>Signing &amp; Capabilities<\/strong> section of your app target.<\/li>\n<li>Add the \u201cGame Controllers\u201d capability in Xcode.<\/li>\n<li>Select each of the <strong>controller profiles<\/strong> your app or game supports. <\/li>\n<\/ol>\n<div class=\"inline-article-image\"><img decoding=\"async\" src=\"https:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2020\/09\/support-game-controllers-in-your-app-1.jpg\" data-hires=\"false\"><\/div>\n<p><em>Note: \u201cExtended Gamepad\u201d refers to game controllers featuring physical buttons, triggers, and thumbsticks such as the Steelseries Nimbus, Sony Dualshock 4 Wireless Controller, Xbox Elite Wireless Controller Series 2, and others; and \u201cMicro Gamepad\u201d refers to the controls provided by the Siri Remote for Apple TV.<\/em><\/p>\n<div class=\"inline-article-image\"><img decoding=\"async\" src=\"https:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2020\/09\/support-game-controllers-in-your-app-2.jpg\" data-hires=\"false\"><\/div>\n<p>If you are building your app using an older version of Xcode, you can indicate controller support by editing the <code>info.plist<\/code> for your app. Set the <code>GCSupportsControllerUserInteraction<\/code> key to <code>true<\/code>, then indicate each of the controller profiles your app supports.<\/p>\n<pre class=\"code-source\"><code>&lt;key&gt;<span class=\"syntax-type\">GCSupportsControllerUserInteraction<\/span>&lt;\/key&gt; &lt;<span class=\"syntax-literal\">true<\/span>\/&gt; &lt;key&gt;<span class=\"syntax-type\">GCSupportedGameControllers<\/span>&lt;\/key&gt; &lt;array&gt; &lt;dict&gt; &lt;key&gt;<span class=\"syntax-type\">ProfileName<\/span>&lt;\/key&gt; &lt;string&gt;<span class=\"syntax-type\">ExtendedGamepad<\/span>&lt;\/string&gt; &lt;\/dict&gt; &lt;\/array&gt;<\/code><\/pre>\n<h3>Press start<\/h3>\n<p>The Game Controller framework offers powerful features for your apps across Apple platforms. And with iOS 14, tvOS 14, and macOS Big Sur, your app will also gain support for the Xbox Adaptive Controller and Xbox Elite Wireless Controller Series 2, custom haptics for rumble feedback, and keyboard and mouse input on iPad. For more information, be sure to check out \u201cAdvancements in Game Controllers\u201d and \u201cBring keyboard and mouse gaming to iPad.\u201d<\/p>\n<h3>Resources<\/h3>\n<section class=\"grid activity\">\n<section class=\"row\">\n<section class=\"column large-4 small-4 no-padding-top no-padding-bottom\"> <a href=\"https:\/\/developer.apple.com\/wwdc20\/10614\" class=\"activity-image-link\"> <img decoding=\"async\" class=\"actiity-image medium-scale\" width=\"250\" src=\"https:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2020\/09\/support-game-controllers-in-your-app-3.jpg\" data-hires=\"false\" alt> <\/a> <\/section>\n<section class=\"column large-8 small-8 padding-left-small padding-top-small padding-bottom-small no-padding-top no-padding-bottom\"> <a href=\"https:\/\/developer.apple.com\/wwdc20\/10614\"> <\/p>\n<h4 class=\"no-margin-bottom activity-title\">Advancements in Game Controllers<\/h4>\n<p> <\/a> <\/p>\n<p class=\"activity-description\">Let\u2019s rumble! Discover how you can bring third-party game controllers and custom haptics into your games on iPhone, iPad, Mac, and Apple TV. We\u2019ll show you how to add support for the latest controllers \u2014 including Xbox\u2019s Elite Wireless Controller Series 2 and Adaptive Controller \u2014 and map&#8230;<\/p>\n<\/section>\n<\/section>\n<\/section>\n<section class=\"grid activity\">\n<section class=\"row\">\n<section class=\"column large-4 small-4 no-padding-top no-padding-bottom\"> <a href=\"https:\/\/developer.apple.com\/wwdc20\/10617\" class=\"activity-image-link\"> <img decoding=\"async\" class=\"actiity-image medium-scale\" width=\"250\" src=\"https:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2020\/09\/support-game-controllers-in-your-app-4.jpg\" data-hires=\"false\" alt> <\/a> <\/section>\n<section class=\"column large-8 small-8 padding-left-small padding-top-small padding-bottom-small no-padding-top no-padding-bottom\"> <a href=\"https:\/\/developer.apple.com\/wwdc20\/10617\"> <\/p>\n<h4 class=\"no-margin-bottom activity-title\">Bring keyboard and mouse gaming to iPad<\/h4>\n<p> <\/a> <\/p>\n<p class=\"activity-description\">Level up your iPad games and add in keyboard, mouse, and trackpad controls. Discover how to use the Game Controller framework to augment your existing titles, bring over games from other platforms, or dream up entirely new interaction experiences. Learn how to integrate keyboard and \u201cdelta\u201d&#8230;<\/p>\n<\/section>\n<\/section>\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>Level up your apps and games with the Game Controller framework and easily build in support for popular console game controllers and MFi accessories on iPhone, iPad, Mac, and Apple TV. The precise control and tactile feedback provided by a game controller can deepen the player\u2019s sense of immersion and enhance their gameplay experience. And [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":118116,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[55],"tags":[],"class_list":["post-118115","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-apple-developer-news"],"_links":{"self":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/118115","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/comments?post=118115"}],"version-history":[{"count":0,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/118115\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media\/118116"}],"wp:attachment":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media?parent=118115"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/categories?post=118115"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/tags?post=118115"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}