Sitemap
Rahul Khanna

Rahul Khanna

Nomadic iOS geek in search of the perfect butter chicken.

Press enter or click to view image in full size

WWDC 2018

8 min readJul 31, 2018

--

Apple’s WWDC is the biggest congregation of Apple developers anywhere in the world. For those who don’t know, WWDC is Apple’s Worldwide Developer Conference held annually in San Jose, California. It consists primarily of a keynote, presentation sessions, 1-on-1 lab consultations and special get-togethers/events.

WWDC is no less than a pilgrimage for all developers working on the Apple SDKs.

A little background on me

I’ve been an iOS developer for > 4 years now and love all things Apple (well, almost all). Every June, streaming the WWDC keynote is as religious a habit as any for me. So, when I was asked to attend WWDC this year, I knew my calling had come. This is my first hand experience - what I learned and more importantly, what I felt was the difference in attending it live versus streaming it online.

The Keynote

WWDC 2018 Keynote

The conference begins with the keynote. This is where Apple unveils their software (and sometimes, hardware) updates to the conference attendees, media and world at large. And, this year was no different.

Apple announced updates to it’s entire line of operating systems - iOS (iOS 12), MacOS (MacOS Mojave), WatchOS (WatchOS 5) and TvOS(TvOS 12), and specifically for developers, the next instalment of the XCode IDE, XCode 10

iOS 12 is primarily focused on performance improvements and digital health while adding much needed features like Grouped & Customizable Notifications, Shared Experiences on ARKit 2, Notification snooze in Do Not Disturb, Screen Time, Group Facetime (upto 32 people simultaneously) and SMS OTP auto-fill.

For me, the biggest announcement was Siri Shortcuts. Shortcuts is Apple’s attempt at reducing the gap to rival smart assistants (Amazon Alexa, Google Assistant, etc). With Shortcuts, users can interact with an application using Siri. For example, a messaging app would likely register the intent to send a message — users can just tell Siri “Send a message to Paul on WhatsApp I’m running late, please start without me”. This is a deeper level of integration allowing developers to utilise Siri to execute complex instructions in their apps. And that’s not all, with iOS 12, users can create their own custom Siri workflows (complete with activation voice phrase) via a new Shortcuts app.

Apple demoed this (37:10 in the keynote video) by creating & running a shortcut that would send a message, show navigation instruction, change thermostat settings, turn on fan and then play a radio station. Phew!

You can find the sample code to support Shortcuts into your app here.

MacOS Mojave brings a smattering of bite-sized enhancements like the much loved dark-mode, gallery mode in Finder and Quick View with ability to perform simple editing tasks and screen recording via screenshot shortcut.

I’m most excited about Apple’s Universal Framework (aka Marzipan) — It will allow developers to port iOS apps to macOS, you just need to add the universal framework to your iOS app and BAM! it’s ready for Mac as well.

Apple is taking a phase-wise approach towards the universal framework with Phase 1 bringing the News, Voice Memos, Stocks and Home app to the Mac from iOS. These new Mac apps are literally just a port of their iOS counterpart and will pave the way for a universal design language for building common apps for iOS and macOS.

WatchOS 5 additions inlcude Walki-Talkie, Webkit and Podcast apps.

TvOS embraces Dolby Atmos support and zero sign-on system.

Platforms State of Union

Unlike the keynote which is more about media announcements, this talk is all for and about developers. Here, Apple discusses the new and updated tools/frameworks for developers.

This year’s PSOU kicked off with privacy and security discussion primarily focused on password management and autofill features in iOS 12.

Apple also announced that Swift 5 will be delivered as part of the OS. Apps will no longer need to include the Swift runtime when releasing builds, resulting in smaller download sizes and faster launches.

XCode 10 comes packed with several updates and much needed improvements. Let’s talk about them:

  • Support for Dark Mode development with preview and customisation features added to the IDE.

Impact: Now build and test your macOS apps in dark mode

  • Ability to build Custom Instruments.

Impact: Precision debugging, optimisation and performance analysis

  • Parallel Testing enables running multiple test suites within a single simulator by creating clone simulators. Xcode creates different runner process under the hood and each process gets specific tests assigned.

Impact: Reduces the test execution dramatically

  • Custom code snippets with support for multiple languages.

Impact: Now save your code snippets from Python, Go, whatever floats your boat

  • Multi-cursor editing (by holding CTRL+SHIFT) for editing multiple lines at the same time, e.g. if you want to convert some functions to private but not all, then select those instances of func and replace them with private func.

Impact: Goodbye to annoyance (a little bit)!

  • Small improvements which will save a lot of time and boost productivity.

Source Control Editor in the gutter will highlight code changes and useful info like code conflicts, authors, etc

Create and upload SSH keys directly to service accounts

XCode 10 playgrounds include interaction that allows you to evaluate new lines of code without restarting the session.

WWDC Sessions

Press enter or click to view image in full size

While day 1 of WWDC is primarily about the keynote and PSOU, the rest of the week is all sessions, and therein lies the difference between attending live vs streaming.

If you’re not attending WWDC live, it’s just a regular day at work and you’d stream at max 2–3 videos — while trying to (and most likely, failing to) stay focussed. Instead, if you are there, you’re free from the daily grind and focussed in each session.

In sessions, Apple engineers talk about framework/feature updates in detail explaining to developers the best ways to leverage them. Starting from 9 in the morning, sessions go on till 6 in the evening — each session clocking in at between 40–60 minutes.

Get Rahul Khanna’s stories in your inbox

Join Medium for free to get updates from this writer.

Highlights:

  1. What’s new in Swift
  • Updates about Swift 4.2 (To be released with XCode 10) and Swift 5
  • Goodies: Iterable enum case, synthesised Equatable and Hashable, handy functions for shuffling & random generation

2. What’s New in Cocoa Touch

  • Brief introduction to all changes coming in iOS 12
  • Tips on how to be a good iOS citizen along with some clever tips about managing image rendering in iOS

3. Getting the Most out of Playgrounds in Xcode

  • Demo on Step-by-Step Execution in the same session introduced with XCode 10
  • This is extremely useful since the current session’s state is maintained while new code can be executed and evaluated

4. Introduction to Siri Shortcuts

  • Best practices and ways to adopt shortcuts
  • How to expose common functionalities of an app to be donated for users to use with Siri shortcuts

5. What’s New in Testing

  • New command line tool called xccov provides detailed viewable code coverage reports and is automation friendly
  • Coverage is visible in the editor itself, which helps keep an account of code yet to be covered with tests
  • Parallel Distributed Testing enables XCode to create and deploy test-cases (in parallel) on app replicas running on duplicate, concurrent instances of simulator — each replica covering a different set of test-cases. This dramatically reduces the test execution time

5. What’s New in Testing: New command line tool called xccov provides detailed viewable code coverage reports and is automation friendly. You can see code coverage in the source editor itself which is good to keep an account of what code is yet to be covered with tests.

6. Advanced Debugging with Xcode and LLDB: My FAVOURITE and If you want to save some debugging time, this is a MUST watch

  • Configuring breakpoints for best use
  • Applying conditions to breakpoints
  • Modifying UI element frames via debug console
  • Debug tab in XCode 10
  • Inserting & evaluating expressions (lines of codes) during runtime using breakpoints

7. Using Collections Effectively

  • Getting familiar with some powerful and fast APIs that Collections (Array, Dictionary, Set) classes offer out of the box

8. Swift Generics

  • Really good practical examples and best practices

WWDC Labs

Labs are a great medium for developers to have one-on-one interactions with the experts (Apple Engineers). Labs are scheduled by framework: Core Data, UIKit, Swift, etc.

Press enter or click to view image in full size

Labs is the perfect opportunity for developers to discuss how Apple Engineers do things and ask any doubts or best practices e.g. system APIs not working the way they should, an implementation you’re not sure about, et al.

To get the best out of labs, I strongly advise to keep a demo project handy. Labs can be really streamlined if you have the code handy to discuss your problems.

Core Data Lab helped me a great deal to get a better understanding about concurrency and heavy weight migration.

In the Collection View Lab, an Apple Engineer accepted one of the system issues related to inverted layout. (If I didn’t have a demo project at hand, he’d have probably given 3–4 things to try. But, with the demo project, he tried them himself and saw the issue. He later asked me to file a radar for it.)

Get Togethers, Networking, Apple Bash

Press enter or click to view image in full size
Firebase Party at WWDC 2018

For a first timer at WWDC, it could get quite overwhelming — so many world class developers under one roof, the diversity hits you like a 10,000W spotlight, but that’s a good thing. You connect and learn so much, how developers/apps started of, what tools/frameworks they use, how they evolved over time. Discussions get especially interesting with veterans who can talk for hours about how the Apple ecosystem and it’s evolution.

The quiet city of San Jose gets a (heavy) dose of carnival-fever. Startups and big tech companies organise parties throughout the week. Use this opportunity to network; we had some great conversations with folks from Israel at the Firebase party.

Apple hosted the Bash on Thursday with Panic! At the Disco performing live. Games, beers, food, music and dance made up for a fun-filled evening.

And It Ends

Press enter or click to view image in full size
Gonzalo Alu (center) and Federico Jordan (right) from OLX, Argentina

That’s the pulse of WWDC — watching the keynote live (and going crazy over all the new updates), chanting “Dub dub — D C” with the Apple staff, attending sessions and interacting with one of the best developer community in the world.

See you at WWDC 2019.

--

--

Rahul Khanna
Rahul Khanna

Written by Rahul Khanna

Nomadic iOS geek in search of the perfect butter chicken.