Hello! My name is Azat Zulkarnyayev, I am developing iOS applications at Badoo. Traditionally, we each year with colleagues spend a week at the WWDC. In the article I share my impressions from the conference: under the cut not only important updates and review of the sessions, but also some personal emotions from being in the happy crowd, who are chanting “Dub-dub! D-C! ”And dreams of shaking hands with Tim Cook.
A little about the conference
Every year, Apple holds a WWDC conference for developers for their platforms and not only for them. Traditionally, events organized by the company cause a big stir. The main innovations, which mainly concern software products, are announced on the first day of the conference. This is followed by sessions from Apple employees designed to help third-party developers to apply these innovations. In the article I will try to tell not only about the technical innovations of the conference, but also general impressions about it.
Impressions
I think that every developer under the Apple platform wants at least once to get to WWDC. And it's not only in lab-sessions, where you can talk in person about your problems and wishes, but also in the significance of the event.
')
The conference usually begins not with the first presentation, which is called Keynote, but with registration, more precisely, the queue for it. In general, the queues are an integral part of the conference, which is logical, because there are thousands of participants, all events take place in one location. The position at the beginning of the line sometimes gives pleasant advantages. For example, Tim Cook personally welcomed the first people to register.
After registration, the participant is given a branded jacket and badges with the symbols of the conference or company.
The idea of issuing a jacket is simply excellent, because many participants, fooled by the sunshine, fly to San Jose without warm clothes. But the weather in California is changeable, and in the evening it gets cold enough. In addition, air conditioners coolly cool the air inside the buildings.
The badges immediately become a target for collectors: people try to supplement their set with the desired badges, and they are constantly being hunted.
Keynote: news
The queue on the Keynote participants begin to take long before the doors open. The fact is that at this presentation are the important news of this year: it is, rather, not for developers, but for a much wider circle of people who are watching the broadcast. The top of the company performs on the stage, and in general it is one of the most significant presentations in the world of mobile development.
One of my colleagues decided this time to get to the first row and took a turn 10 hours before the opening. But, unfortunately, this year there was a hitch: first, people from another block of the queue were let in, and the best places were already taken. In general, the first places in the queue do not guarantee the best seats in the hall.
In general, the atmosphere of the event resembles a holiday: the organizers congratulate the participant for the fact that they got here, in the queues chanting “Dub-dub! D-C! ”, Apple fans are hunting for new icons, everything is quite dynamic and interesting. It is nice to know that the most important things in iOS / MacOS development happen here and now, that is, the impression of watching videos at home or at work varies greatly with the actual presence in the hall. It is very inspiring, inspiring to try all the innovations and integrate them into their products. A short brainstorm with colleagues from Badoo at the conference has become a big list of things that we would like to implement in our applications.
As always, rumors about future updates began to appear long before the conference. This year WWW was waiting for the announcement of a new version of iOS, tools for cross-platform development for iOS and MacOS, sunset iTunes, the new Mac Pro. There were even speculations about augmented reality glasses.
Many of these rumors have been confirmed. But first things first.
Apple TV
First, about tvOS. UI tvOS has undergone a strong redesign.
Apple is actively promoting its TV + TV platform, and as a result, we saw a TV series trailer at WWDC. Despite the efforts made, here Apple remains in the role of a catch-up. Platforms like Netflix are better for now, both in terms of UX and content.
Perhaps the most pleasant innovation for AppleTV is support for Xbox and PlayStation joysticks.
iPadOS
Visually, it is not much different from iOS. The goal, perhaps, is to bring the iPad closer to the Mac. As a result, developers have the ability to easily port iPad apps to MacOS. Apple tablets have become more functional: for example, you can now use them as a second monitor and connect a usb drive to them. The latter is possible due to the updated Files application for working with the file system.
Safari should now work more adequately, producing a layout for the desktop version of the site instead of mobile.
The split screen function has improved. Now each application can simultaneously have several windows simultaneously displayed on the screen. For example, it is possible to simultaneously work with two or more documents within one application.
Watch OS
Now, to install the application on the Apple Watch, it is not necessary to do it on the bound iPhone. AppStore for Apple Watch appeared as a logical continuation. All this means that you can now search and install applications directly from the clock. It is not clear how this will be useful for users, because the convenience of this method of installation is questionable. A nice bonus is the new design options on the main screen of the watch.
Mac os
The name of the new version is MacOS Catalina in honor of the island near Los Angeles. This time not many new products were announced. The only thing that can be remembered is that iTunes will no longer exist, and its parts will exist as separate applications.
Not without self-irony were presented Apple Music, Podcasts and TV, which were previously part of iTunes. You can work with connected devices through the Finder.
iOS 13
Perhaps the main changes affected iOS. There were many updates, let's stop on the main thing.
Improved performance: applications began to run faster - apparently, not least due to the fact that the Swift Runtime is already sewn into the system. The size of the binary file downloaded during the installation and update of applications has also decreased slightly. I am glad that Apple continues to work on optimizing its products; it will be curious to compare the actual values of the improvements with those announced at the presentation.
The main visual innovation that many have been waiting for a long time is a dark topic. System applications look very nice in the new context.
A lot of excitement has arisen around the possibility of registering / authorizing applications using Apple Id. What was presented at the presentation is a matter of respect for the company: an easy way has finally emerged to quickly log in to third-party services without providing their real data. Maybe this will be a headache for some applications, because Apple is set to make this type of authorization mandatory for all applications using OAuth.
Separately, I wanted to mention the improvement in the system of the application Find My Mac. Now, even if the laptop is in sleep mode and / or does not have access to the network, it can communicate via Bluetooth with Apple devices nearby, which in turn will send information about the location of the Apple computer. A simple but very useful and effective idea that it would be very difficult for another company to do due to the lack of trust and a single communication protocol between smartphones and computers.
Also, it should be noted that now the iOS system keyboard will still support swipe between letters, which means that lovers of this type of typing will no longer need to install third-party keyboards. And finally, the button for switching to the keyboard with emoji is separated from the button for switching the language.
Of the rest, we can mention Apple’s efforts to catch up with Google Maps, incorporating the equivalent of Google Streets mode into its Maps application, smart sorting and grouping of photos, and custom Animoji sticker packs. Also presented are some not very significant improvements to standard applications.
Mac pro
The main and only non-software product introduced was the new Mac Pro. I will not give possible sources of inspiration for the designer of the appearance of the device: the first look at the front of the system unit caused an involuntary chuckle, which is rare for the products of this company.
In general, designers preferred the practicality of elegance. A new generation of computer is very different from the previous one, which was compared with another household item. There has been some return to the roots, and the new Mac Pro is in many ways similar to its first generation.
However, inside it is a completely new car. The possible power of the computer and the presented monitor is really impressive, but the price makes you think about the need for such wonderful devices. Apparently, in order not to frighten the audience, the price was presented only for the most basic configuration of the system unit, which is $ 6000. The new 31.6-inch XDR 6K monitor will cost at least $ 4,999 dollars. Well, here you need to add $ 999 for the stand. Indeed, not against the wall to lean it.
Swift UI
The most important announcement for developers. Apple still released a new declarative framework for developing the Swift UI. The consequences of changing the concept are hard to overestimate: the first impression from the presentation was similar to the conference symbol on the facade of the building.
The speakers did not name their sources of inspiration. All new things are usually presented as innovations, tactfully avoiding mentioning similar solutions. In general, people familiar with other frameworks for the declarative way of developing an interface learned familiar principles. The influence of the ideas of React, and maybe even Flutter, is guessed. But all this remains speculation. There are mentions on Twitter that the work on this framework has been going on for at least 3 years, which is not surprising given how much has changed.
A change in the concept of interface development often develops into a change in the approach to working with data, because an approach in which instead of explicit assignments a functional relationship between values is declared is very well combined with a declarative interface.
Perhaps the most common framework for implementing a similar concept for iOS is RxSwift. Apple introduced an alternative, new framework,
Combine . At first glance, the classes of this framework are similar to those of Java.
WWDC sessions
The main part of the conference is a series of sessions where Apple employees talk about new technologies and explain how to use them correctly. Each session contains a presentation of the changes and their demonstration by some example.
For the week, the San Jose Convention Center turns into a mini-university for developers and not only. More than a hundred presentations, thousands of participants, active discussions in the breaks.
Below I will list the description of some interesting, in my opinion, sessions with WWDC.
Swift UI
At these sessions,
basic information about Swift UI was given, ideas about the goals and goals that the framework developers were trying to achieve were presented, and simple use cases were shown. The examples are really impressive: sometimes you even get the feeling that this is too good to be true.
With the help of new features of the language, the description of the hierarchy of elements becomes very expressive and declarative. So much so that there is no need for XML Xib files to generate a preview based on the code.
The main features of the framework are the value type of the display, the automatic construction of the difference between the two states of the displayed data and the fact that the hierarchy of objects described by the code does not necessarily coincide with the real hierarchy of the drawn view elements.
Value-type objects allow you to quickly create and delete objects from memory. It is unclear how the mapping renderer and the component that generates the difference between the states is implemented: Apple rarely opens the source code of the created tools.
In the first sessions, simple examples were presented, towards the end,
complex cases with complex drawing of large amounts of data were shown. I am very pleased that non-interactive elements that require a large amount of resources for drawing can be transferred to Metal Drawing mode with a single line, and productivity increases several times.
Here, viewers were introduced to the new framework for working with Data Flow. For those who have worked with Rx or similar tools, little will seem new; other developers at the presentation were impressed by the expressiveness of the new approach. The presentation showed quite standard examples for jet frameworks. The case with the search field and sending a request to the server with the entered text has become a textbook. In general, the library is not so big, and reading the
documentation is already enough.
In Combine, as well as in Swift UI, value-types are actively used for greater performance. However, it remains not entirely clear how resources are released after a call to cancel a subscription. I recommend
an article by Michael Long on this topic: it describes possible problems that can be encountered when using the framework.
In addition to Combine, Apple has made extensions to Foundation components for conveniently converting standard data flow to reactive.
Swift Package Manager
Apple decided to still finish its tool for working with dependencies. Now it is fully
supported by Xcode 11 , integration with GitHub and other popular services for repositories is implemented. The session tells how to work with SPM in Xcode (which is quite simple) and how dependency conflicts are resolved.
Work with collections
For those who do not plan to switch to Swift UI, Apple has introduced
new tools to make it easier to work with UI lists (Collection View, Table View) in UIKit. New data source for collections on different platforms will make it easier to update the display of lists without fear of stumbling on a runtime error due to the incomplete state of the list. A common thread through many reports was the idea of a single source of truth, and new components implement this concept for UI lists.
For Collection View, a
new layout view is introduced. Using the new concept of a group, you can describe a completely different arrangement of elements within one section. Thus, within the same collection, different sections may have different scrolling directions. In my opinion this is one of the most useful innovations, which will greatly simplify the creation of composite lists.
In the new version of Swift, you can do the so-called property wrappers. In fact, these are generic classes that add some behavior to an object property. It sounds very abstract, but it is a very strong change in the language, which adds an analogue of annotations to object properties in Swift.
It is also now quite easy to make your typed DSL. Judging by the words of the speaker at the session, one of the Apple developers made DSL for HTML tags in a couple of hours. The function is still in beta, and it may become even more interesting during evolution.
To avoid problems when using protocols associated type or Self requirement, opaque types are derived. Adding the keyword some before the type will allow using the type of such protocols not only as a generic constraint.
All these innovations are actively used in SwiftUI, so I recommend to get acquainted with the principles of new features of the language.
The Foundation has some nice things like the time formatter for some date, the localization of the contents of the collection, the elements of which, in turn, can be displayed in a localized format.
IOS changes
There are a lot of changes here, so I’ll mention only the main ones.
If you support authorization in your system through third-party services like Google or Facebook, then Apple will soon require support for
authorization via Apple ID . Perhaps in some cases this will be a special case of authorization, so do not delay with the integration of this functionality.
A
new type of providing user
geodata to the application has appeared. Now the user has the opportunity to provide access to his location only during the current session of the application. Authorization state transitions are not so obvious, so the video is a must-see.
Many applications use work in the background, so, perhaps, the session about
changes in the API for working with background tasks will be relevant.
In short, you can now postpone the task until the user connects the device to a power source. And yes, now it will not be possible to use VoIP push notifications in order to wake up the application without using CallKit. I also advise you to check that the server will send the necessary parameters in the push notification content with the necessary values mentioned in the video.
The dark theme that is available in iOS 13 can also be a challenge for many applications. If a third-party application ignores the style specified by the system, this can lead to the fact that users will be unhappy with the application as a whole. Therefore it is good to maintain a dynamic style in your application, if it is acceptable in terms of design.
Resources such as colors or images can be dynamic and their specific meaning depends on the context. Style information is stored in Traits Collections and, based on its current value, the same dynamic color can have different values. You can easily make your colors or resources dynamic through the asset directory in Xcode or programmatically, taking the trait collection as an initializer parameter.
Changing the theme can be obtained in the traitCollectionDidChange method, but we must bear in mind that now a UIView is immediately created with the specified collection. That is, before adding mappings to the hierarchy, UIKit itself assigns the most probable future collection to an object.
For more information about the dark theme, you can find out in
this video .
Machine learning
The main innovation is that now you can adjust the trained models for a specific user, producing training directly on the device. To do this, you need to collect data for training based on user actions and run training that can use graphics cards for computing. In the case of neural networks, it is better to do this in the background task and then when the device is charging.
Apple also opened new APIs for
analyzing photos ,
sound , and text recognition in the image.
Should I go to WWDC? Yes!
I singled out only the main, in my opinion, moments. A lot of new products were presented at the conference, and I recommend watching the main sessions myself.
In general, trends in the development of the Apple ecosystem are evident in terms of privacy and user data protection. On the technical side, there are attempts to bring the company's platform closer to each other, the transition to a functional programming style and the active use of machine learning to adapt the behavior of applications to the needs of the user.
It's great that Apple pays so much attention to the people involved in the development and organizes such events at the highest level. Ticket prices may seem too high, but in my opinion, it's worth it. If you are a student, I highly recommend applying for a WWDC
student program visit next year: it’s not as difficult as it seems, this year the proportion of student participants was quite large.