WWDC 2017 Initial Impressions
- Xcode 9
- New Editor
- Swift 4
- Xcode ❤️s GitHub
- Wireless Debugging
- Simulator Enhancements
- iOS 11
- Drag and Drop
- Machine Learning
- HEVC and HEIF
- AirPlay 2
- iOS Rapid Fire
- Refreshed Desktops
- iMac Pro
- New iPad Pro
- What Are People Excited About?
- Where To Go From Here?
I hope you enjoyed the WWDC keynote and Platforms State of the Union yesterday – I know I did!
Whether we were at WWDC, or watching the live steam, the raywenderlich.com team and I loved finding out about the new tech and sharing our reactions. We had some especially fun discussions about some of the odd naming choices! :]
As the iOS team lead at raywenderlich.com, I thought it would be useful to write a quick post sharing some of my initial reactions to all of the new announcements.
Feel free to post any of your own thoughts, or post anything I may have missed!
Personally, the thing I get most excited for each WWDC is the new version of Xcode. This year, Xcode 9 was announced, and it represents a huge update with a lot of major changes we’re all going to love.
Xcode 9 has a brand new Source Editor, entirely written in Swift. In the new editor you can use the Fix interface to fix multiple issues at once. Also, when mousing around your projects, you can hold the Command key and visually see how structures in your code are organized:
One announcement that received a strong ovation was Xcode 9 will now increase or decrease font size in the Source Editor with Command-+ or Command– – the keyboard shortcut shared by many other text editors.
And as an added bonus, the new source editor also includes an integrated Markdown editor (which will really help create some nice looking GitHub READMEs).
I’ve been excitedly anticipating Xcode’s ability to refactor Swift code for as long as Swift has been a thing. IDE-supported refactoring has long been a standard for top-tier development environments, and it’s so good to see this is now available in Xcode 9 for Swift code (in addition to Objective-C, C++ and C). One of the most basic refactorings is to rename a class:
Notice the class itself is renamed, and all references to that class in the project are renamed as well, including references in the Storyboard and the filename itself! Sure, renaming something isn’t that tough, but you should lean on your IDE wherever possible to make your life easier.
There’s a bunch of other refactoring options available as well, and what’s even cooler is Apple will be open sourcing the refactoring engine so others can collaboratively extend and enhance it.
Xcode 9 comes with Swift 4 support by default. In fact, it has a single Swift compiler that can compile both Swift 3.2 and Swift 4, and can even support different versions of Swift across different targets in the same project!
We’ll be posting a detailed roundup about What’s New in Swift 4 on raywenderlich.com soon.
Xcode ❤️s GitHub
Xcode 9 now connects easily with your GitHub account (GitHub.com, or GitHub Enterprise) making it very easy to see a list of your existing projects, clone projects, manage branches, use tags, and work with remotes.
Xcode 9 no longer requires you to connect your debugging device to your computer via USB. Now you can debug your apps on real devices over your local network. This will also work with Instruments, Accessibility Inspector, Quicktime Player, and Console.
There’s some really neat changes to the iOS Simulator. Now you can run multiple simulators at once!
Yes, this is a screenshot I just took, and these are all different simulators running at the same time! In addition to each simulator being resizable, simulators also include a new bezel where you can simulate different hardware interactions that weren’t possible in the past.
There were two improvements to Xcode’s automated testing support that caught my eye:
Xcode UI tests can access other apps – It hasn’t been possible in the past to write Xcode UI tests for app functionality that lives inside other apps, like Settings, or Extensions. It’s now possible for your Xcode UI tests to access other apps for providing deeper verification of behavior.
For example, if your app leverages a Share Extension to receive photos, it was not possible to write an Xcode UI test to open the Share Sheet in the Photos app to share a picture into your app. This is now possible.
- Tests Can Run On Simulators In Parallel – Taking advantage of the ability to run more than one iOS Simulator at the same time, automated tests can now run on more than one simulator at the same time. For example, this will be useful for running your test suite against an iOS 10 Simulator while simultaneously running the same suite on an iOS 11 Simulator.
Several changes were made to Xcode that will speed up your app development process:
- The Xcode team put some special effort into the Source Editor to ensure high performance editing for files of all sizes.
- Xcode comes with a new build system with much improved speed. It’s beta so it’s off by default; be sure to enable in File->Workspace Settings.
- Additionally, if you use Quick Open or the Search Navigator, you’ll see near-instantaneous results for whatever you are searching for.
iOS 11 was announced today and beta 1 is already available for download. There were several features that peaked my interest.
Drag and Drop
Perhaps the most exciting iOS enhancement for me was the introduction of drag and drop to the iPad. You can now drag and drop things from one place to another, whether it’s within a single app, or even across separate apps!
As a user, you can also take advantage of other advanced multitouch interactions to continue grabbing additional items to eventually send to the destination app.
UICollectionView make it pretty easy to add drag and drop to lists in your app.
Take a look at Apple’s drag and drop documentation for a section called First Steps to understand how to add drag and drop to your app.
WWDC 2017 introduced ARKit, a framework that provides APIs for integrating augmented reality into your apps. On iOS, augmented reality mashes up a live view from the camera, with objects you programmatically place in the view. This gives your app’s users the experience their content is a part of the real world.
Augmented reality programming without some sort of help can be very difficult. As a developer you need to figure out where your “virtual” objects should be placed in the “reality” view, how the objects should behave, and how they should appear. This is where ARKit comes to the rescue and simplifies things for you the developer.
ARKit can detect “planes” in the live camera view, essentially flat surfaces where you can programmatically place objects so it appears they’re actually sitting in the real world, while also using input from the device’s sensors to ensure these items remain in the correct place. Apple’s article on Understanding Augmented Reality is a good place to start for learning more.