How to Build Better Apps with Xcode 9 and iOS 11
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!
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.
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
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.