Check out the highlights from the Platforms State of the Union.
Xcode 9 updates abound!
Thanks to a new indexing engine (that can run as part of the build process), Xcode is loads faster. Open Quickly opens projects more quickly, searching is up to 50 times faster, and the new build system makes the whole app a lot less of a performance hog.
New source code editor
Xcode's source code editor got some attention this year. The editor is now — in Apple's words — buttery smooth when scrolling. Preferences have been updated with new options for font, line spacing, and cursor type. Oh, it also does a great job rendering Markdown files.
It's got a new refactoring and transformation engine, too, giving you ultimate control over your code and letting you get down to business without ever leaving your main code editor (a little more often, at least). Here are some of the new refactorings and transformations Apple announced:
- Add missing protocol requirements
- Generate missing implementation stubs
- Add missing overrides for abstract methods
- Extract to local variable
- Extract method / expression
- Expand default in switch statements to generate all applicable cases
- Convert if/else to / from switch statement
- Wrap string in NSLocalizedString macro
Apple says GitHub told 'em 2/3 of the commits on GitHub came from MacBooks so they thought it was time for some deep integrations. You can log in with your GitHub account and Xcode will show you all your repositories and let you search for other projects as well. Xcode 9's source control navigator makes it super simple to view your branches, tags, and other items. You can also create and merge branches within the navigator.
Simulator is not only faster, it also sports a new look. 😎 Now when you're simulating your app, you can see what the device looks like surrounding the screen! You can also make use of the hardware buttons — sleep/wake, Home, silence — and they'll work just like they do in real life. Same goes for gestures from the edge of the screen.
Wireless development in Xcode 9
When you run your iOS and tvOS devices on your local network, you needn't futz about with USB cords. You can install, run, and debug your apps on your devices wirelessly. Apple says you'll be able to make use of these tools in Instruments, Accessibility Inspector, Configurator, Quicktime Player, and Console as well.
Now there's no need to install macOS Server separately. You can enable Xcode Server right within Xcode 9 for running continuous integration bots.
Swift 4 got some time on stage at the Platforms State of the Union (makes sense, eh?). The open source programming language got some performance improvements, a couple new features, shorter build times, and smaller app binaries.
(Mostly) worry-free Swift migration
With Swift 4, migration is much easier. You don't have to worry about modifying your code to use the new compiler — you can take advantage of Swift 4's new features and use Swift 3 in other areas of your app until you're ready to bring the whole thing over. Here are the three modes for Swift 4's compiler:
- Swift 3 mode: The default for existing code. It will build source code that built with the Swift 3 compiler
- Swift 4 mode: Enables you to use new features and performance optimizations of Swift 4, some of which may require migration, making it easier to migrate than the previous transition from Swift 2.2 to Swift 3.
- Mixed mode: Allows you to take advantage of interoperability between binaries built with the same compiler. This helps developers who have projects that mix packages written with Swift 3 with packages written with Swift 4, as long as all packages are built using the Swift 4 compiler. This allows developers to gradually migrate specific portions of their code to Swift 4 over time.
Other updates and additions to Swift 4
Apple has a full list of updates to Swift 4 (and most go over my head), but here's some of the new stuff you can look forward to in Swift 4:
- Faster, easier to use Strings that retain Unicode correctness and add support for creating, using and managing substrings
- Smart key paths for type-safe, efficient, extensible key value coding for Swift types
- Enhancements to creating and manipulating Dictionary and Set types
- Extends support of archival and serialization to struct and enum types and enables type-safety for serializing to external formats such as JSON and plist
- Enforced exclusive access to memory
Apple introduced some new APIs at the WWDC 2017 Keynote and expanded upon 'em at the Platforms State of the Union.
MusicKit lets you link up your app or game to a user's Apple Music and local music library. You can create playlists, add songs, and play music from both Apple Music and their local content. If a user has yet to subscribe to Apple Music, you can give 'em an option to do just that.
Machine Learning with Core ML
Apple's Core ML machine learning technology works with Siri, Messages, maps, and the camera. It lets you easily integrate machine learning models so you can build apps with neat new features (like near-instant photo editing and photo manipulation) without too much work. Apple says you just have to add "a few lines of code."
Core ML includes both the Vision and Natural Language APIs. Here's how Apple describes both:
Vision API: "You can easily build computer vision machine learning features into your apps. Supported features include face tracking, face detection, landmarks, text detection, rectangle detection, barcode detection, object tracking, and image registration."
Natural Language API: "Use trained machine learning models to deeply understand text using features such as language identification, tokenization, lemmatization, part of speech, and named entity recognition."
ARKit is a new framework from Apple that'll let you take advantage of iPhone and iPad's sensors and camera to create augmented reality experiences. The ARKit demo on stage at WWDC 2017 was incredible and Apple's new framework will help any developer create apps that make use of the platform. Coupling data from the camera and sensor data from iPhone and iPad, the framework uses something called Visual Inertial Odometry to track what's in its view.
Apple says it built ARKit so that it works well with Metal, SceneKit, Unity, and Unreal Engine.
Apple External Graphics Development Kit
Apple announced macOS High Sierra (that's the next version of macOS) will support virtual reality. Developers wanting to kick the tires on the new experience can purchase a $599 External Graphics Development Kit that'll let users develop and test VR content on any Mac that has Thunderbolt 3 connectivity.
Apps that use Metal, OpenCL, and OpenGL can now take advantage of the increased performance that external graphics processors can bring. The External Graphics Development Kit includes everything you need to start optimizing advanced VR and 3D apps on external graphics processors with macOS High Sierra.
The kit includes a Sonnet external GPU chassis with Thunderbolt 3, an AMD Radeon RX 580 8GB graphics card, and a Belkin USB-C to 4-port USB-A hub. It also features — with limited availability — a promo code for $100 towards an HTC Vive VR headset.
What's got you excited?
Did we miss anything totally awesome at the State of the Union? Sound off in the comments with your picks!