{"id":36599,"date":"2018-04-18T13:22:15","date_gmt":"2018-04-18T20:22:15","guid":{"rendered":"https:\/\/blog.xamarin.com\/?p=36599"},"modified":"2019-04-04T07:47:14","modified_gmt":"2019-04-04T14:47:14","slug":"automatic-provisioning-visual-studio-2017","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/xamarin\/automatic-provisioning-visual-studio-2017\/","title":{"rendered":"Automatic Provisioning with Visual Studio 2017"},"content":{"rendered":"<p>\t\t\t\tiOS device provisioning is largely regarded by all iOS developers, Xamarin or otherwise, as being one of the biggest barriers to getting started with iOS. To test and deploy your app on a device, you must enroll in Apple&#8217;s Developer Program, create a certificate to sign the app, create an app ID, and register your device with Apple. We&#8217;ve written some <a href=\"https:\/\/docs.microsoft.com\/xamarin\/ios\/get-started\/installation\/device-provisioning\/manual-provisioning?tabs=vswin\">great documentation<\/a> on the subject as it&#8217;s a complicated process with many points of failure.<\/p>\n<p>We also always want to make things as simple as possible for Xamarin.iOS developers, so you can spend your time focusing on creating great apps, not on iOS provisioning. A few months ago, we introduced Automatic Provisioning to Visual Studio for Mac, and we&#8217;ve finally brought these capabilities to Visual Studio 2017 with Version 15.7 Preview 3. In this post, you\u2019ll learn how to use the new automatic signing feature in Visual Studio to deploy your app to a device in about 30 seconds.<\/p>\n<h2>Connecting your Apple Account<\/h2>\n<p>To begin the automatic signing process, make sure you\u2019ve signed in to Visual Studio with an Apple ID via the <a href=\"https:\/\/docs.microsoft.com\/xamarin\/cross-platform\/macios\/apple-account-management\">Apple Account options<\/a>. iOS provisioning requires that you be a member of the <a href=\"https:\/\/developer.apple.com\/programs\/\">Apple Developer Program<\/a>. If you haven&#8217;t signed up yet, now is a good time to do it.<\/p>\n<p>To open the account management window, go to <strong>Tools &gt; Options &gt; Xamarin &gt; Apple Accounts<\/strong>. Select the <strong>Add<\/strong> button and enter your Apple ID and password. Your credentials are saved in the secure Keychain on your machine, and fastlane\u202fis used to handle your credentials securely while passing them to Apple\u2019s developer portal.<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-36621 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/44\/2019\/03\/prov1.png\" alt=\"\" width=\"1778\" height=\"1156\" \/><\/p>\n<h2>Enabling Automatic Signing<\/h2>\n<p>Once you\u2019ve ensured you have an Apple ID connected to Visual Studio, you\u2019re ready to enable Automatic Signing.<\/p>\n<p>In your iOS project, right-click on the project name and go to <strong>Properties &gt; iOS Bundle Signing<\/strong>:<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-36609 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/44\/2019\/03\/Capture2.png\" alt=\"\" width=\"2207\" height=\"1274\" \/><\/p>\n<p>Select the <strong>Automatic Provisioning<\/strong> scheme radio button:<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-36618 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/44\/2019\/03\/prov4.png\" alt=\"\" width=\"1526\" height=\"300\" \/><\/p>\n<p>Then, select your team from the <strong>Team<\/strong> dropdown:<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-36619 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/44\/2019\/03\/prov3.png\" alt=\"\" width=\"1690\" height=\"488\" \/><\/p>\n<p>This starts the automatic signing process. Visual Studio then attempts to generate an App ID, provisioning profile, and a signing identity to use these artifacts for signing. You can see the generation process in the <strong>Build output<\/strong>:<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-36617 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/44\/2019\/03\/prov5.png\" alt=\"\" width=\"2862\" height=\"978\" \/><\/p>\n<p>When automatic signing has been enabled, Visual Studio updates the provisioning artifacts, if necessary, when any of the following things happen:<\/p>\n<ul>\n<li>When an iOS device is plugged in to the <a href=\"https:\/\/docs.microsoft.com\/xamarin\/ios\/get-started\/installation\/windows\/connecting-to-mac\/\">Mac build host<\/a>.\n<ul>\n<li>Visual Studio checks to see if the device is registered on the Apple Developer Portal. If it is not, then the device is added and a new provisioning profile is generated.<\/li>\n<\/ul>\n<\/li>\n<li>When the bundle ID of your app is changed.\n<ul>\n<li>Visual Studio updates the app ID to match the bundle ID. A new provisioning profile containing this app ID is generated.<\/li>\n<\/ul>\n<\/li>\n<li>When a supported capability is enabled in the Entitlements.plist file.\n<ul>\n<li>This capability is added to the app ID and a new provisioning profile with the updated app ID is generated.<\/li>\n<li>Not all capabilities are currently supported.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>Deploying your App<\/h2>\n<p>To deploy your app to a provisioned device, plug your device in to your Mac build host and select it from deployment target list. Alternatively, if your iOS device is connected to the Mac build host <a href=\"https:\/\/docs.microsoft.com\/xamarin\/ios\/deploy-test\/wireless-deployment?tabs=vswin\">wirelessly<\/a>, you&#8217;ll be given an option to select it from the deployment target list.<\/p>\n<h2>Wrapping Up<\/h2>\n<p>This blog post introduced the new automatic signing capabilities in Visual Studio 2017 15.7 Preview 3 and demonstrated just how quickly you can now deploy your iOS, tvOS, and watchOS apps to a device.<\/p>\n<p>For more information on Device Provisioning, refer to our documentation on <a href=\"https:\/\/docs.microsoft.com\/xamarin\/ios\/get-started\/installation\/device-provisioning\/?tabs=vsmac\">Setting up a device for development<\/a>.<\/p>\n<p><a href=\"https:\/\/forums.xamarin.com\/125648\">Discuss this post in the Xamarin Forums!<\/a>\t\t<\/p>\n","protected":false},"excerpt":{"rendered":"<p>iOS device provisioning is largely regarded by all iOS developers, Xamarin or otherwise, as being one of the biggest barriers to getting started with iOS. To test and deploy your app on a device, you must enroll in Apple&#8217;s Developer Program, create a certificate to sign the app, create an app ID, and register your [&hellip;]<\/p>\n","protected":false},"author":574,"featured_media":39167,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[2],"tags":[6,4],"class_list":["post-36599","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-developers","tag-ios","tag-xamarin-platform"],"acf":[],"blog_post_summary":"<p>iOS device provisioning is largely regarded by all iOS developers, Xamarin or otherwise, as being one of the biggest barriers to getting started with iOS. To test and deploy your app on a device, you must enroll in Apple&#8217;s Developer Program, create a certificate to sign the app, create an app ID, and register your [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts\/36599","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/users\/574"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/comments?post=36599"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts\/36599\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/media\/39167"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/media?parent=36599"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/categories?post=36599"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/tags?post=36599"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}