How to Build Better Apps with Xcode 9 and iOS 11

Visual Studio App Center

Visual Studio Mobile Center is now Visual Studio App Center. Learn more here.   Appleā€™s 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ā€™m highlighting my favorite new features and how theyā€”like Mobile Centerā€”free you to build better apps faster.

Code and Debug, butĀ Better

Historically, refactoring has been one of Xcodeā€™s weak spots. As with drive-thru fast food, it did the job but left much to be desired. Like many other developers, Iā€™ve mitigated this by ā€œdining elsewhereā€: using JetBrainsā€™ AppCode IDEā€™s refactoring and code generation to supplement Xcode.

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!

Xcode 9ā€™s new refactoring options. Code generation is a delicious appetizer, but not the main course. Xcode 9 serves the ā€œentrĆ©eā€ 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ā€™t have to render the simulatorā€™s GUI, and iOS 11ā€™s built-in screen recording means you can gather richer feedback from your testers and users.

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 (according to Apple) is minimal, you can regularly enable both additional checks without majorly impacting your development.

Speed Up YourĀ Builds

Xcode 9 includes an all-new build system, written entirely in Swift, that provides better reliability and faster builds (see Apple docs).

Simply enable it in your Workspace Settings or by invoking xcodebuild -UseNewBuildSystem=YES. Currently optional while in preview, it will become the default in a future version of Xcode.

Navigate to Workspace Settings in Xcode 9.

 

Select and enable the new build system from Xcode 9. After you enable the new build system locally, you can set up Xcode 9 in Mobile Centerā€™s Build service in minutes, and weā€™ll utilize the new system for your subsequent builds.

Gather More AppĀ Ratings

What else is on the menu thatā€™s easy to miss, but just as good?

iOS 10.3 introduced SKStoreReviewController, Appleā€™s own UI to ask users for app reviews. Originally a welcome addition, itā€™s now an App Store requirement; developers canā€™t 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.

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ā€™s great for users and developers. Iā€™ve reached out to a few Microsoft app development teams to learn about their experiences, and many have seen a lot more ratings after implementing SKStoreReviewController.

Better user experience and more reviews? As a developer, thereā€™s nothing better than more five-star reviews, so Iā€™m all for it.

Last Words: DigĀ in!

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.

Weā€™re as excited as you are to play with everything thatā€™s new. As you prep your apps for the new OS and hardware, weā€™ve worked hard to make sure Mobile Center is ready to help you take advantage of all of the latest features on the menu, including:

  • Mobile Center SDKs are ready for Xcode 9 and iOS 11
  • Mobile Center Build service will support Xcodeā€™s new build system
  • Mobile Center Test service now includes devices running iOS 11, available for your Launch Tests and your entire automated UI test suite

 

 

While youā€™re feasting on everything iOS 11 has to offer, log in to your Mobile Center account or start using Mobile Center for freeā€”our services and SDKs are ready for iOS 11 and Xcode 9ā€”to spice up your app development!

Weā€™d 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.

PS: Thanks (a ton!) to my fellow software engineer, Lukas SpieƟĀ for his help making this post happen.

0 comments

Discussion is closed.

Feedback usabilla icon