{"id":375,"date":"2017-09-29T03:28:15","date_gmt":"2017-09-28T20:28:15","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/mobilecenter\/?p=375"},"modified":"2019-02-16T15:30:44","modified_gmt":"2019-02-16T22:30:44","slug":"how-to-build-better-apps-with-xcode-9-and-ios-11","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/appcenter\/how-to-build-better-apps-with-xcode-9-and-ios-11\/","title":{"rendered":"How to Build Better Apps with Xcode 9 and iOS 11"},"content":{"rendered":"<p><em>Visual Studio Mobile Center is now Visual Studio App Center. <a href=\"https:\/\/blogs.msdn.microsoft.com\/vsappcenter\/introducing-visual-studio-app-center\/\" rel=\"noopener\" target=\"_blank\"><em>Learn more here<\/em><\/a>.<\/em>\n&nbsp;\nApple\u2019s official release of iOS 11 is packed with a smorgasbord of tasty morsels for users <em>and<\/em> developers. To help you dive in and get the most from iOS 11 and Xcode 9, I\u2019m highlighting my favorite new features and how they\u2014like <a target=\"_blank\" href=\"https:\/\/www.visualstudio.com\/vs\/mobile-center\/\" rel=\"noopener\">Mobile Center<\/a>\u2014free you to build better apps faster.<\/p>\n<h3>Code and Debug, but\u00a0Better<\/h3>\n<p>Historically, refactoring has been one of Xcode\u2019s weak spots. As with drive-thru fast food, it did the job but left much to be desired. Like many other developers, I\u2019ve mitigated this by \u201cdining elsewhere\u201d: using JetBrains\u2019 AppCode IDE\u2019s refactoring and code generation to supplement Xcode.<\/p>\n<p>Xcode 9 brings refactoring and code generation directly into Xcode, removing the need for another IDE. Extract methods or all occurrences of a variable? Add missing protocol requirements with a right-click? Done!<\/p>\n<p><img decoding=\"async\" src=\"\" alt=\"Xcode 9\u2019s new refactoring options.\" width=\"1000\" height=\"625\" class=\"aligncenter wp-image-595\" \/>\nCode generation is a delicious appetizer, but not the main course. Xcode 9 serves the \u201centr\u00e9e\u201d tapas-style, with a little something for everyone. You can now debug over the network on multiple devices (no more cables) and emulators in parallel, making testing and debugging even more efficient. Headless testing for builds from the command line means your CI server doesn\u2019t have to render the simulator\u2019s GUI, and iOS 11\u2019s built-in screen recording means you can gather richer feedback from your testers and users.<\/p>\n<p>For dessert, Xcode 9 delivers an easily enabled main thread checker and undefined behavior sanitizer. The sweetest part: not only are both features awesome for helping you track down issues in your apps, but, since the 20% CPU impact (<a target=\"_blank\" href=\"https:\/\/developer.apple.com\/documentation\/code_diagnostics\/undefined_behavior_sanitizer\" rel=\"noopener\">according to Apple<\/a>) is minimal, you can regularly enable both additional checks without majorly impacting your development.<\/p>\n<h3>Speed Up Your\u00a0Builds<\/h3>\n<p>Xcode 9 includes an all-new build system, written entirely in Swift, that provides better reliability and faster builds (<a target=\"_blank\" href=\"https:\/\/developer.apple.com\/library\/content\/documentation\/DeveloperTools\/Conceptual\/WhatsNewXcode\/xcode_9\/xcode_9.html\" rel=\"noopener\">see Apple docs<\/a>).<\/p>\n<p>Simply enable it in your Workspace Settings or by invoking <code>xcodebuild -UseNewBuildSystem=YES<\/code>. Currently optional while in preview,<a target=\"_blank\" href=\"https:\/\/developer.apple.com\/library\/content\/documentation\/DeveloperTools\/Conceptual\/WhatsNewXcode\/xcode_9\/xcode_9.html\" rel=\"noopener\"> it will become the default<\/a> in a future version of Xcode.<\/p>\n<p><img decoding=\"async\" src=\"\" alt=\"Navigate to Workspace Settings in Xcode 9.\" width=\"1000\" height=\"625\" class=\"aligncenter wp-image-586\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><img decoding=\"async\" src=\"\" alt=\"Select and enable the new build system from Xcode 9.\" width=\"1000\" height=\"625\" class=\"aligncenter wp-image-585\" \/>\nAfter you enable the new build system locally, you can set up Xcode 9 in Mobile Center\u2019s Build service in minutes, and we\u2019ll utilize the new system for your subsequent builds.<\/p>\n<h3>Gather More App\u00a0Ratings<\/h3>\n<p>What else is on the menu that\u2019s easy to miss, but just as good?<\/p>\n<p>iOS 10.3 introduced <code>SKStoreReviewController<\/code>, Apple\u2019s own UI to ask users for app reviews. Originally a welcome addition, it\u2019s now an App Store requirement; developers can\u2019t use any other UI to ask users to leave app reviews. With this move, Apple ends the long debate about when, how, and how often to prompt users to rate apps, giving us a simple answer: three times a year.<\/p>\n<p>This is great for users, who no longer need to leave apps to write reviews, making the experience less disruptive and eliminating constant prompts to submit ratings. As a developer, however, this might seem extreme at first glance. Fear not, though, because it\u2019s great for users <em>and <\/em>developers. I\u2019ve reached out to a few Microsoft app development teams to learn about their experiences, and many have seen a lot more ratings after implementing <code>SKStoreReviewController<\/code>.<\/p>\n<p>Better user experience and more reviews? As a developer, there\u2019s nothing better than more five-star reviews, so I\u2019m all for it.<\/p>\n<h3>Last Words: Dig\u00a0in!<\/h3>\n<p>From the file management app to drag-and-drop features to a completely overhauled control center experience, iOS 11 is great and Xcode 9 feels better than ever.<\/p>\n<p>We\u2019re as excited as you are to play with everything that\u2019s new. As you prep your apps for the new OS and hardware, we\u2019ve worked hard to make sure Mobile Center is ready to help you take advantage of all of the latest features on the menu, including:<\/p>\n<ul>\n<li>Mobile Center SDKs are ready for Xcode 9 and iOS 11<\/li>\n<li>Mobile Center Build service will support Xcode\u2019s new build system<\/li>\n<li>Mobile Center Test service now includes devices running iOS 11, available for your Launch Tests and your entire automated UI test suite<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><img decoding=\"async\" src=\"\" alt=\"\" width=\"1000\" height=\"943\" class=\"aligncenter wp-image-825\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>While you\u2019re feasting on everything iOS 11 has to offer, <a target=\"_blank\" href=\"https:\/\/mobile.azure.com\/login\" rel=\"noopener\">log in to your Mobile Center account<\/a> or <a target=\"_blank\" href=\"https:\/\/mobile.azure.com\/login\" rel=\"noopener\">start using Mobile Center for free<\/a>\u2014our services and SDKs are ready for iOS 11 and Xcode 9\u2014to spice up your app development!<\/p>\n<p>We\u2019d love to hear your favorite features (whether you agree or disagree); click on the chat icon from any Mobile Center page to connect with the team, share your feedback, ask questions, or learn more.<\/p>\n<p>PS: Thanks (a ton!) to my fellow software engineer, <a target=\"_blank\" href=\"https:\/\/twitter.com\/Lumaxis\" rel=\"noopener\">Lukas Spie\u00df<\/a><span>\u00a0<\/span>for his help making this post happen.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Visual Studio Mobile Center is now Visual Studio App Center. Learn more here. &nbsp; Apple\u2019s official release of iOS 11 is packed with a smorgasbord of tasty morsels for users and developers. To help you dive in and get the most from iOS 11 and Xcode 9, I\u2019m highlighting my favorite new features and how [&hellip;]<\/p>\n","protected":false},"author":42,"featured_media":38034,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[16],"tags":[],"class_list":["post-375","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mobiledev"],"acf":[],"blog_post_summary":"<p>Visual Studio Mobile Center is now Visual Studio App Center. Learn more here. &nbsp; Apple\u2019s official release of iOS 11 is packed with a smorgasbord of tasty morsels for users and developers. To help you dive in and get the most from iOS 11 and Xcode 9, I\u2019m highlighting my favorite new features and how [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/appcenter\/wp-json\/wp\/v2\/posts\/375","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=375"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/appcenter\/wp-json\/wp\/v2\/posts\/375\/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=375"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/appcenter\/wp-json\/wp\/v2\/categories?post=375"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/appcenter\/wp-json\/wp\/v2\/tags?post=375"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}