The Apple WWDC Event 22 is coming to a close. While we are still reeling regarding the newest launches, the highlights for day 5 are necessary. Day 5 revolved around the integration of the new features introduced by Apple. By building inclusive applications and having the accessibility to toolkits, developers can streamline the process of app development.
Let’s take a look at the final day releases on day 5 of the Apple WWDC event.
Apple WWDC Event 2022 Day 5 Summary
The announcements for Apple developer conference day 5 are all about creating an experience through app and camera extensions, Xcode cloud for teams, and designing interfaces across various applications. This developer conference has been informative, insightful, and full of surprises that will keep improving the application development process.
Let’s dive into the sessions from day 5 of the Apple WWDC Event 22.
Metal accelerating Machine Learning
As we delve deeper into Metal for accelerating PyTorch model training on the macOS infrastructure. There are various updates enlisted to the TensorFlow training support, allowing developers to explore all the latest features and operations on MPS Graph. The framework of Metal gives applications direct access to the graphic processing unit or GPU of a device. By integrating Metal, the application can leverage the GPU for rendering complicated scenes rapidly and parallelly running the computational tasks. Applications in certain categories can benefit from the maximized performance by using Metal. These include:
- Games that render a 3D sophisticated environment.
- Video processing applications similar to Final Cut Pro
- Apps related to scientific research for analyzing and processing a large number of datasets.
Metal also works collaboratively with other frameworks that can supplement Metal’s capabilities. MetalFX helps upscale renderings in a shorter period than native rendering, and MetalKit helps simplify the tasks that display the Metal content on screen. With the metal Performance Shader framework, developers can access a large library consistent with optimized computing and rendering shaders taking advantage of the unique hardware of GPUs. Various high-level Apple frameworks benefit from the performance of Metal, including SceneKit, RealityKit, Core Image, and SpriteKit. These frameworks assist in integrating GPU programming details.
Improving Battery Consumption for Apple Devices
By improving battery performance and consumption, Apple devices can offer a better shelf life for all their products. By limiting the power usage of a device, developers can churn out more from an app. By utilizing the Background Task Framework, Apple app developers can keep the content updated and run through tasks within minutes while keeping the application running in the background. With longer tasks, there may be a requirement for powered devices and proper network connectivity. Developers can register launch handlers for certain tasks to power down battery consumption during application launches and schedule them according to requirements. The system will automatically launch the app in the background while executing necessary tasks.
The Dark Mode in Apple devices was launched when iOS 13 was released. This allows users to configure their devices for a darker representation. Familiarity with the personalization benefits in Dark Mode, but it affects the battery life on Apple devices dramatically. This is usually due to the OLED displays on iPhone 13 and 13 pro. Darker content consumes less power compared to light content on devices. An OLED screen requires individual power for each pixel, as compared to darker colors that require less power consumption to light up every pixel. The display continues to be one of the major resources for power consumption, so adopting the Dark Mode can be a beneficial element to eliminate power consumption and improve battery life.
Apple software updates usually include an array of energy-saving technological implementations. This makes sure to use the latest versions of iOS, macOS, and watchOS. Developers can also make a total of four key changes to the code – Adopting Dark Mode, Auditing Frame Rates, Limiting Background Time, and Deferring the work on an application.
Server-Side Development with Xcode SwiftUI
In this Apple WWDC event session, developers can discover how to create, deploy, and build a Swift Server application within the same workspace alongside the pre-existing projects in Xcode SwiftUI. Swift serves as a general-purpose language of programming for building modern approaches toward performance, safety, and software design. The main goal for SwiftUI lifecycle projects is to create the best language available for multiple uses ranging from mobile and desktop applications to system programming. Swift helps to design, write, and maintain the correct programs for developers when creating the program. Xcode assists developers in organizing and building an application for various Apple platforms. This code can be shared using coding packages while also embracing the unique aspects of each device on the platform that has a specific application code.
With systems gradually growing, iOS application development often needs to complement the application of a client with the server-based component. These server components allow client apps to extend the functionalities into the integrated cloud systems. These server applications are modeled as Swift packages that define a target that can be executed and maps the entry point of an application. For transforming an application into a web app, the addition of dependency on a web framework can assist in putting a structure to the code and provide basic functionalities corresponding to routings.
Building Custom Catalogs with ShazamKit
ShazamKit can help developers to find data and information regarding a specific audio recording when a segment of the specific recording is a part of the sound that has been captured. Apple ShazamKit utilizes the unique acoustic signature of a specific audio recording to find an exact match. This signature helps capture the time-frequency distribution of audio signal energy, which is smaller in size than the original audio track. This is a one-way conversion, so converting the signature back to the original recording isn’t a viable option.
The ShazamKit generates a reference signature that is applicable for each searchable complete audio recording. The Shazam Catalog stores these reference signatures and the associated metadata. When searching for a match, it compares to something called the query signature, where the ShazamKit will generate captured audio about the signatures in the catalog. The matches take place when the query signature has a sufficient matching capability to match a part of the reference signature of audio. App developers in Apple can build custom catalogs with their reference signatures and the associated metadata with the audio recording.
Bringing Multiple Windows to SwiftUI Apps
Apple developers can compose rich views by reacting to the state changes on the customized mobile applications for the app’s scene presentation and behavior on macOS and iPadOS. These scenes are a common representation of the contents with a window on screen. Platforms supporting multiple windows like iPadOS and macOS apps, the scene represents itself with several such windows. The representation and behavior of a scene depend on the type that is used. The scene types in SwiftUI include the WindowGroup, which offers a way to create data-driven apps across every Apple platform. The DocumentationGrouhelps to build document-based applications on macOS and iOS. The settings determine the interface representing in-app settings value on a macOS. These types of scenes can be composed and combined to extend the functionalities of an application.
There are two new additions to the list of scenes. That includes:
- Window: This scene represents a unique and single window on all platforms and as a new scene type dedicated to macOS.
- MenuBarExtra: This renders as a persistent control unit in the system menu bar.
For other existing scene types, Window and MenuBarExtra can both be used as standalone scenes or can be composed with other scenes in the application. This characteristic can be extremely useful when the content of a scene represents the state of some global app that would otherwise not fit well with the WindowGroups’ multi-window style of presentation on iPadOS and macOS.
Building Device-to-Device Interactions with the Network Frameworks
One interesting session at Apple WWDC event 22 has been the development of device-to-device interactions by using a networking framework. This helps create custom protocol networking for playing games across tvOS, watchOS, iPadOS, and iOS devices. A sample code for a simple Tic-Tac-Toe code project has created a networked game that can be played between various Apple devices with a custom protocol communication mode. It offers two ways to play the game:
- It can be played on the Apple TV by using the DeviceDiscoveryUI to discover the nearest iPadOS, iOS, or watchOS devices. Once connected, it can be used on the devices to play against AI opponents on the Apple TV.
- For iOS and iPadOS devices, the game used TLS and Bonjour to establish secure connectivity with nearby devices. This mode can be played in a peer-to-peer protocol in a two-player setting.
These were the final announcements for the last day of the Apple WWDC event 2022. With the perfect closure for developers to integrate a streamlined workflow when working on iOS app development projects. These new launches can help achieve the right communication and frame networks between all Apple devices. The focus is to create inclusive applications for users by enhancing the user experience while also improving the integration of technological inputs into the framework of an application. Let’s look forward to the next WWDC event in 2023 to make the iOS app development process an immersive experience.
Follow the announcements of the entire Apple WWDC Event 2022 here:
Pritam Barhate, with an experience of 14+ years in technology, heads Technology Innovation at Mobisoft Infotech. He has a rich experience in design and development. He has been a consultant for a variety of industries and startups. At Mobisoft Infotech, he primarily focuses on technology resources and develops the most advanced solutions.