{"id":3605,"date":"2018-03-23T08:41:43","date_gmt":"2018-03-23T16:41:43","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/vsappcenter\/?p=3605"},"modified":"2019-02-16T15:30:24","modified_gmt":"2019-02-16T22:30:24","slug":"fast-meets-faster-speed-up-your-codepush-workflow-with-the-react-native-tools-extension-for-visual-studio-code","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/appcenter\/fast-meets-faster-speed-up-your-codepush-workflow-with-the-react-native-tools-extension-for-visual-studio-code\/","title":{"rendered":"Fast Meets Faster: Speed Up Your CodePush Workflow with the React Native Tools Extension for Visual Studio Code"},"content":{"rendered":"<p>Recently, we released CodePush functionality in the React Native (RN) Tools extension for VS Code. CodePush is a feature in Visual Studio App Center that allows React Native and Cordova developers to push updates instantly over-the-air to end users. This is the ideal solution for hot-fixing your app when waiting isn\u2019t an option, as well as for a CI\/CD workflow. If you need a primer on CodePush and its abilities, start here: <a href=\"https:\/\/blogs.msdn.microsoft.com\/vsappcenter\/deliver-lightning-fast-updates-to-your-users-with-codepush-a-beginners-guide\/\" rel=\"noopener\" target=\"_blank\">Deliver Lightning Fast Updates to your Users with CodePush: A Beginner\u2019s Guide<\/a>. <\/p>\n<p>App Center enables its users to continuously build, test, release, and monitor iOS, Android, Windows, and macOS apps. The addition of CodePush in the React Native Tools extension for VS Code allows you to instantly get releases in the hands of users. We made it faster and easier to distribute CodePush releases with just a few clicks in VS Code.<\/p>\n<p>In this post, I&#8217;ll explain how to start using CodePush functionality in the React Native Tools extension for VS Code and how it improves your workflow. Although this post is targeted at React Native, please note that CodePush functionality is available in the Cordova Tools extension for VS Code as well!   <\/p>\n<p>Before outlining the new and enhanced flow of releasing, I&#8217;d like to start by outlining the primarily CLI based flow of pushing a CodePush release using VS Code. In order to push a release, you must: <\/p>\n<ol>\n<li>Save any changes to your code that you would like to release. <\/li>\n<li>Open the VS Code terminal window (or an external terminal). <\/li>\n<li>Run the App Center CLI to release an update. <\/li>\n<li>Repeat. <\/li>\n<\/ol>\n<p>With this new functionality, you&#8217;ll take half the steps to complete your push. All you need to do is save your changes in VS code and release\u2014that&#8217;s it! <\/p>\n<h2>How it Works<\/h2>\n<p>Distributing a CodePush release has never been simpler. A written explanation doesn\u2019t do the process justice, so we&#8217;re going to walk through using the extension to truly highlight and display how easy it is to use.<\/p>\n<p>Let\u2019s start by downloading the <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=vsmobile.vscode-react-native\" rel=\"noopener\" target=\"_blank\">React Native Tools extension<\/a>. The extension can be found in the VS Code Extension Marketplace. It looks like this:<\/p>\n<p><img decoding=\"async\" src=\"\" alt=\"\" width=\"750\" class=\"aligncenter size-large wp-image-3615\" \/><\/p>\n<p>After a successful installation of the extension, we\u2019re ready to get started. Upon opening a CodePush enabled Application in VS Code, you should see a \u201cLogin to App Center\u201d button on the bottom left of your VS Code window.  <\/p>\n<p><img decoding=\"async\" src=\"\" alt=\"\" width=\"750\" class=\"aligncenter size-large wp-image-3625\" \/><\/p>\n<p>Clicking the button initiates the login process, allowing you to log in through an authentication token or through the interactive login via the App Center portal. After logging in, you should get a message signaling that you have successfully logged in.  <\/p>\n<p><img decoding=\"async\" src=\"\" alt=\"\" width=\"750\" class=\"aligncenter size-large wp-image-3635\" \/><\/p>\n<p>Now we\u2019re ready to start using CodePush!  <\/p>\n<p>Start by clicking the button located on the bottom left of your screen, which should say your App Center username now that you&#8217;re logged in.<\/p>\n<p><img decoding=\"async\" src=\"\" alt=\"\" width=\"750\" class=\"aligncenter size-large wp-image-3645\" \/><\/p>\n<p>You&#8217;ll then be presented with a few options. To start releasing updates, you need to set your current app so App Center knows what application to target. This is an essential step in the process.  <\/p>\n<p>When setting your current app, you&#8217;ll be prompted with a list of your CodePush enabled App Center apps. Selecting the targeting app will result in a message confirming your app selection and your current deployment.<\/p>\n<p><img decoding=\"async\" src=\"\" alt=\"\" width=\"750\" class=\"aligncenter size-large wp-image-3655\" \/><\/p>\n<p>Lastly, there\u2019s the step of releasing. This step is as simple as the previous steps. After making your desired changes and saving them in VS Code, simply press the button again and select &#8220;Release&#8221;. <\/p>\n<p><img decoding=\"async\" src=\"\" alt=\"\" width=\"750\" class=\"aligncenter size-large wp-image-3665\" \/><\/p>\n<p>After selecting &#8220;Release&#8221;, you&#8217;ll be prompted with a confirmation. Your release is now in the hands of your users!<\/p>\n<p><img decoding=\"async\" src=\"\" alt=\"\" width=\"750\" class=\"aligncenter size-large wp-image-3675\" \/><\/p>\n<p>If you would like to see a list of all possible actions, simply open the command palette and type \u201cReact Native CodePush\u201d.<\/p>\n<p><img decoding=\"async\" src=\"\" alt=\"\" width=\"750\" class=\"aligncenter size-large wp-image-3685\" \/><\/p>\n<p><strong>That\u2019s it!<\/strong><\/p>\n<p>The App Center team has worked to make sure you can create and release in as few steps as possible, and we believe this is a huge step in simplifying the release process. In most cases, releasing is possible with the click of a few buttons.  <\/p>\n<p>To get started, all you need is a free App Center account, a <a href=\"https:\/\/docs.microsoft.com\/en-us\/appcenter\/distribution\/codepush\/react-native\" rel=\"noopener\" target=\"_blank\">CodePush integrated app<\/a>, and the <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=vsmobile.vscode-react-native\" rel=\"noopener\" target=\"_blank\">React Native Tools extension<\/a>.\n&nbsp;\n&nbsp;\n<a href=\"https:\/\/appcenter.ms\/signup\"><img decoding=\"async\" src=\"\" alt=\"Get started now button\" width=\"200\" class=\"aligncenter size-full wp-image-2585\" \/><\/a>\n&nbsp;\n&nbsp;  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently, we released CodePush functionality in the React Native (RN) Tools extension for VS Code. CodePush is a feature in Visual Studio App Center that allows React Native and Cordova developers to push updates instantly over-the-air to end users. This is the ideal solution for hot-fixing your app when waiting isn\u2019t an option, as well [&hellip;]<\/p>\n","protected":false},"author":42,"featured_media":38034,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[16],"tags":[],"class_list":["post-3605","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mobiledev"],"acf":[],"blog_post_summary":"<p>Recently, we released CodePush functionality in the React Native (RN) Tools extension for VS Code. CodePush is a feature in Visual Studio App Center that allows React Native and Cordova developers to push updates instantly over-the-air to end users. This is the ideal solution for hot-fixing your app when waiting isn\u2019t an option, as well [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/appcenter\/wp-json\/wp\/v2\/posts\/3605","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/appcenter\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/appcenter\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/appcenter\/wp-json\/wp\/v2\/users\/42"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/appcenter\/wp-json\/wp\/v2\/comments?post=3605"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/appcenter\/wp-json\/wp\/v2\/posts\/3605\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/appcenter\/wp-json\/wp\/v2\/media\/38034"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/appcenter\/wp-json\/wp\/v2\/media?parent=3605"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/appcenter\/wp-json\/wp\/v2\/categories?post=3605"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/appcenter\/wp-json\/wp\/v2\/tags?post=3605"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}