Dub-dub 2019: WWDC news and my impressions

    Hello! My name is Azat Zulkarnyaev, I am developing iOS-applications at Badoo. Traditionally, every year we spend a week with colleagues at WWDC. In the article I share my impressions from the conference: under the cut not only important updates and a review of the sessions, but also a few personal emotions from being in a happy crowd that chants “Dub-dub! DC! ” and dreams of shaking hands with Tim Cook.



    A little bit about the conference


    Every year, Apple holds a WWDC conference for developers for its platforms and not only for them. Traditionally, events organized by the company cause a great stir. The main innovations, which mainly relate to software products, are announced on the first day of the conference. The following are sessions from Apple employees designed to help third-party developers apply these innovations. In the article I will try to tell not only about the technical innovations of the conference, but also the general impressions of it.

    Impressions


    I think every developer for the Apple platform wants to get to WWDC at least once. And the matter is not only in lab sessions, where you can talk in person about your problems and wishes, but also in the sign of the event.

    The conference usually begins not with the first presentation, which is called Keynote, but with registration, or rather, the queue for it. In general, queues are an integral part of the conference, which is logical, because there are thousands of participants, all events are held in one location. The position at the beginning of the queue sometimes gives pleasant advantages. For example, Tim Cook personally greeted the first people to register.

    After registration, the participant is given a company jacket and badges with the symbols of the conference or company.



    The idea of ​​giving out a jacket is simply excellent, because many participants, deceived by the sunny weather, arrive in San Jose without warm clothes. But the weather in California is changeable, and in the evening it gets cold enough. In addition, air conditioning is mercilessly cooling the air inside buildings.

    Badges immediately become a goal for collectors: people try to complement their set with the desired badges, and they are constantly hunted.

    Keynote: New


    Queues at Keynote begin to take participants long before the doors open. The fact is that this presentation presents important new products of this year: it is more likely not for developers, but for a much wider circle of people who watch the broadcast. The top of the company appears on the stage, and in general this is one of the most significant presentations in the world of mobile development.

    One of my colleagues decided this time to get on the first row and took the line 10 hours before the opening. But, unfortunately, this year there was a hitch: first people were let in from another block of the line, 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 on the fact that they got here, chanting “Dub-dub! DC! ”, Apple fans are hunting for new badges, everything is pretty dynamic and interesting. It's nice to realize that the most important things in iOS / MacOS development are happening here and now, that is, the impression of watching a video at home or at work is very different from the real presence in the hall. It is very inspiring, inspiring to try all the innovations and integrate them into your products. The short brainstorm with colleagues from Badoo at the conference turned into a large list of things that we would like to implement in our applications.

    As always, long before the conference, rumors began to appear about future updates. This year, WWDC expected 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 television platform TV +, and as a result, we saw the series trailer at WWDC. Despite the efforts made, here Apple remains in the role of catching up. Platforms like Netflix are still better in terms of both UX and content.

    Perhaps the most pleasant innovation for most AppleTV is support for the 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 applications to MacOS. Apple's tablets have become more functional: for example, now they can be used 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, giving out layout for the desktop version of the site instead of mobile.

    The function of dividing the screen into parts has improved. Now each application can have several windows simultaneously displayed on the screen. For example, you can simultaneously work with two or more documents within a single application.



    Watch OS


    Now, to install the application on the Apple Watch, it is not necessary to do this on the attached iPhone. As a logical continuation, the AppStore application for the Apple Watch appeared. All this means that now you can search and install applications right from the clock. It is unclear how useful this will be for users, because the convenience of this installation method is questionable. A nice bonus is the new design options for 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 so many new products were announced. From the memorable one can only mention that the iTunes application will no longer be, and its parts will exist as separate applications.

    Apple Music, Podcasts and TV, which used to be part of iTunes, were presented with some irony. It will be possible to work with connected devices through the Finder.

    iOS 13


    Perhaps the main changes have affected iOS. Many updates were presented, let’s dwell on the main thing.

    Performance improvement: applications began to run faster - apparently, not least due to the fact that Swift Runtime is already sewn into the system. The size of the binary file downloaded during the installation and updating of applications has also slightly decreased. I am glad that Apple continues to work on optimizing its products, it will be curious to compare the real values ​​of the improvements 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 a new context.

    A lot of hype has arisen around the possibility of registration / authorization in applications using Apple Id. What was presented at the presentation evokes respect for the company: finally, an easy way has appeared to quickly log in to third-party services without providing your real data. Maybe this will be a headache for some applications, because Apple is configured to make this type of authorization mandatory for all applications using OAuth.

    Separately, I would like to mention the improvement in the system of the Find My Mac application. Now, even if the laptop is in sleep mode and / or does not have network access, it can exchange messages via Bluetooth with nearby Apple devices, which in turn will send information about the location of the Apple computer. A simple, but very useful and effective idea that would be very difficult to make for another company due to the lack of trust and a single communication protocol between smartphones and computers.

    Also it is impossible not to mention that now the iOS system keyboard will still support swipe typing between letters, which means that fans of this typing method no longer need to install third-party keyboards. Finally, the emoji keyboard toggle button is separated from the language toggle button.

    Of the other new products, one can mention Apple's efforts to catch up with Google Maps, introducing an analogue of the Google Streets mode to its Maps application, smart sorting and grouping of photos, custom sticker packs based on Animoji. 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: a 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. The new generation of the 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 in appearance to its first generation.



    However, inside it is a completely new car. The possible power of the computer and the presented monitor are 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 to the most basic configuration of the system unit, which is $ 6,000. 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 to lean against the wall.

    Swift ui


    The most important announcement for developers. Apple still released a new declarative framework for developing UI on Swift. The consequences of changing the concept can hardly be overestimated: the first impression of the presentation was like a symbol of the conference on the building's facade.



    Speakers did not name their sources of inspiration. Usually everything is presented as new as innovations, tactfully avoiding the mention of similar solutions. In general, people familiar with other frameworks for a declarative way to develop an interface recognized 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 work on this framework has been going on for at least 3 years, which is not surprising given how much things have changed.

    A change in the concept of developing an interface often turns 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 this concept for iOS is RxSwift. Apple introduced an alternative, new framework, Combine . At first glance, the classes in this framework are similar to those in 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 using an example.
    For a week, the Conventional Center in San Jose is turning into a mini-university for developers and more. More than a hundred presentations, thousands of participants, active discussions during the breaks.

    Below I list the description of some interesting, in my opinion, sessions with WWDC.

    Swift ui


    At these sessions, they provided basic information about Swift UI, talked about ideas, goals that framework developers are trying to achieve, and showed simple use cases. The examples are really impressive: sometimes it even feels like it's too good to be true.

    With the new features of the language, the description of the hierarchy of elements becomes very expressive and declarative. So much so that there is no longer any need for XML Xib files to generate code-based previews.

    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 rendered view elements.

    Value-type objects allow you to quickly create and delete objects from memory. How the renderer of mappings and the component that generates the difference between states is implemented is not yet clear: Apple rarely opens the source code of the created tools.

    At the first sessions, simple examples were presented; closer to the end, complex cases were shown with complex rendering of a large amount of data. It is very pleasing that non-interactive elements that require a large amount of resources for rendering can be switched to the rendering mode through Metal with one line, and productivity grows significantly.

    Combine


    Here, viewers were introduced to the new Data Flow framework. 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 reactive frameworks. A case with a search field and sending a request to the server with the entered text has already become a textbook. In general, the library is not so large, and familiarization with the documentation is already enough.

    Combine, like Swift UI, actively uses value types for greater performance. However, it remains unclear how resources are freed up after the unsubscribe call. I recommend an articleMichael Long on this topic: he describes the possible problems that you may encounter when using the framework.

    In addition to Combine, Apple has made Foundation component extensions to conveniently convert standard data flow to reactive.

    Swift package manager


    Apple decided to finally complete its dependency tool. Now it is fully supported by Xcode 11 , integration with GitHub and other popular services for repositories has been implemented. The sessions describe how to work with SPM in Xcode (which is pretty simple) and how dependency conflicts are resolved.

    Work with collections


    For those who do not plan to switch to Swift UI, Apple introduced new tools to facilitate the 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 upon a runtime error due to the unstable state of the list. Through many reports, the idea of ​​a single source of truth has been a common thread, and new components implement this concept for UI lists.

    Collection View introduced a new layout view. Using the new concept of a group, it is possible to 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.

    Swift


    In the new version of Swift, you can do the so-called property wrappers. In essence, these are generic classes that add some behavior to the property of an object. It sounds very abstract, but it is a very powerful language change that adds an analogue of annotations to the properties of objects in Swift.

    It's also now easy enough to make your own typed DSL. Judging by the speaker at the session, one of the developers of Apple made a DSL for HTML tags in a couple of hours. The function is still in beta, and perhaps during evolution it will become even more interesting.

    To avoid problems when using protocols with an associated type or Self requirement, opaque types are derived. Adding the keyword some in front of the type will allow the use of the type of such protocols not only as a generic restriction.
    All these innovations are actively used in SwiftUI, so I recommend that you familiarize yourself with the principles of the new language features.

    Foundation


    The Foundation has come up with nice things like a time formatter regarding a certain date, 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 will mention only the main ones.
    If you support authorization in your system through third-party services such as Google or Facebook, then soon Apple will require support for authorization through Apple ID . Perhaps in some cases this will be a special case of authorization, so do not delay the integration of this functionality.

    A new type of user- provided geodata is now available. Now the user has the opportunity to provide access to his location only during the current session of the application. Transitions of the authorization state are not so obvious, so the video must be watched.

    Many applications use work in the background, so perhaps a session about changes to the API will be relevant.work with background tasks. In short, now you can postpone the task before the user connects the device to a power source. And yes, now it will not work 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 contents of the push notification 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 users being dissatisfied with the application as a whole. Therefore, it would be nice to maintain a dynamic style in your application, if this 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 may have different values. You can easily make your colors or resources dynamic through the asset directory in Xcode or programmatically by accepting a trait collection as an initializer parameter.

    Changing the theme can be obtained in the traitCollectionDidChange method, but keep in mind that now the UIView is immediately created with the given collection. That is, even before adding to the hierarchy of mappings, UIKit itself assigns the most probable future collection to the object.

    You can find out more about the dark topic in this video .

    Machine learning


    The main innovation - 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, which can use graphics adapters for calculations. In the case of neural networks, it is better to do this in the background task and 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 highlighted only the main, in my opinion, moments. The conference was presented much more new products, and I recommend to see the main sessions myself.

    In general, Apple’s ecosystem development trends are visible in terms of privacy and user data protection. From the technical side, one can see attempts to bring company platforms closer to each other, the transition to a functional programming style and the active use of machine learning to adapt application behavior to user needs.

    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 overpriced, but, in my opinion, it's worth it. If you are a student, I highly recommend that you apply for a WWDC visit next year.student program : it is not as difficult as it seems, and this year the proportion of student participants was quite large.

    Also popular now: