WWDC 2024: New Libraries for iOS Developers

Pierpaolo Pignelli - 2024-06-26

In this article, we explore the new features presented at the latest WWDC, with a focus on innovative libraries that are expanding the possibilities of the Swift language.

To paraphrase an old homegrown hit, this year's congress was not just the realm of Apple Intelligence, which nonetheless got the space it deserved. We have already covered it here.

In the latest Worldwide Developers Conference, Apple once again shifted the boundaries of developer innovation, introducing a series of libraries that promise to add preforming arrows to our developer bow to make increasingly stunning apps! 

Index 

  1. WWDC: Beyond AI...There's More. 
    1. FinanceKit: The Wallet Management Library 
    2. The visionOS library for Interactive Gaming   
    3. AccessorySetupKit: Making pairing easy is now a reality
    4. SwiftData 2.0: Evolution of Data Management in Swift  
  2. Big libraries come with big responsibilities

WWDC: Beyond AI...There's more. 

From advanced financial data integration with FinanceKit, through immersive gaming sessions with TabletopKit, to the new frontiers of data management with SwiftData, this article will guide you through the new possibilities these tools offer. 

  

The introduction of these libraries opens up scenarios for the creation of new apps: if FinanceKit opens up the money tracker line (which is already present in the store) with pairing with Wallet, TabletopKit will allow the virtualization of many games we are used to in the presence (or alone) for exciting multiplayer games. 

 

The upgrade to SwiftData shows the company's high interest in making it a natural choice as soon as possible as a DB choice. 

 

AccessorySetupKit winks at many hardware manufacturers who will thus be able to open up to the Apple ecosystem by facilitating the pairing of their devices. 

 

Read on to find out together how these technologies are defining the future of app design and development in the Apple ecosystem. 

FinanceKit: The Wallet Management Library 

Managing personal finances is more than a necessity, it is a true art, and FinanceKit is here to turn every developer into a financial connoisseur.  

 

This library enables sophisticated integration of Wallet data directly into the apps we are developing, giving users the freedom to decide what information to import and for how long, ensuring impeccable privacy. 

ulixegroup_wwdc_financekit_tool_developers_wallet_privacy

FinanceKit, check for data

With FinanceKit, you can not only import data, but also perform detailed transaction queries by category and amount. Imagine being able to analyze user spending trends, or visualize cash fluctuations through dynamic graphs integrated directly into the app. 

 

To enable these advanced features, it will be essential to configure the Info.plist file with the key "Financial data usage description under privacy." 

financekit_transaction_picker_tool_developers_wallet_privacy_wwdc_ulixegroup

Transactions by categories and amounts

FinanceKit's approach to financial data management not only enhances the functionality of apps but also promises to significantly improve the user experience (UX) through a design that minimizes data overload, making interactions smoother and more responsive. 

The visionOS library for Interactive Gaming

With the introduction of TabletopKit in WWDC 2024, Apple has opened new frontiers for board game enthusiasts, who can now harness the power of visionOS, which we discussed in this article, to enjoy immersive gaming experiences right from the couch at home.

 

This revolutionary library not only allows you to define the size and shape of virtual tables, but also to fully customize the game environment with interactive elements through integration with RealityKit and its hyper-realistic models to add light and shadow to game table elements. 

tabletopkit_gaming_ios_library_wwdc_visionOS_ulixegroup

TabletopKit

With TabletopKit, developers can easily set up multiplayer matches, incorporating elements such as dice rolling or card distribution, all automated or manual depending on the needs of the game. Using SharePlay to facilitate multiplayer connections simulates a physical gaming experience, virtually transforming each session into a dynamic social gathering. Here is an example of how to structure this arrangement from the demo project here.

tabletopkit_gaming_ios_teamselector_shareplay_wwdc_visionOS_ulixegroup

Multiplayer connection

tabletopkit_gaming_ios_teamselector_shareplay_wwdc_visionOS_ulixegroup

SharePlay

Of course, this can also be accomplished for games with fewer players, such as a chess game, with the possibility of having up to 3 spectators ready to cheer us on (and maybe not suggest)! 

 

Now the challenge is all ours: to bring our favorite board games to the visor system! 

AccessorySetupKit: Making pairing easy is now a reality

The recent introduction of AccessorySetupKit by Apple during WWDC 2024 marked a significant step forward in facilitating pairing and event management for devices such as joysticks, cameras, vehicles through CarPlay, drones, and other accessories. This library, ideal for developers who already have experience with beacons and tags, offers an intuitive and highly customizable pairing interface that manufacturers can adapt with images and text specific to each accessory. 

One notable change is the introduction of a numeric security code to complete the pairing process, raising the security level of connections. In addition, paired devices now appear in a dedicated section within the "Privacy and Security" submenu of the settings, making the management of connected devices more transparent.

accessorySetupKit_pairing_gaming_ios_teamselector_shareplay_wwdc_visionOS_ulixegroup

AccessorySetupKit, facilitation of pairing

Transmission of events from devices to the main app occurs with minimal latency, improving not only responsiveness but also the overall user experience. In an age dominated by connectivity and a myriad of smart accessories, AccessorySetupKit promises to transform the way we interact with everyday technology, making pairing a smoother and more accessible process for Apple devices. 

SwiftData 2.0: Evolution of Data Management in Swift

SwiftData 2.0 turned out to be a heavenly update for iOS developers, making significant improvements in data management and persistence in Swift applications.  

 

This version introduces the #Unique macro, a powerful tool for developers familiar with relational languages, allowing the uniqueness of records to be defined directly in the database source code. 

 

With this macro, it is possible to specify that a combination of attributes in a model class must be unique, ensuring data integrity. For example, the @Attribute(.preserveDataOnDeletion) annotation can be used to keep records accessible via the history API even after they have been deleted, a feature that greatly expands the data change tracking capabilities. 

 

SwiftData 2.0 also extends its capabilities with the #Index macro, which facilitates the aggregation of attributes commonly used in queries, optimizing application performance and responsiveness. This feature is particularly useful in big data scenarios, where query efficiency is crucial. 

New features in SwiftData 2.0 not only simplify data management but also encourage a more natural and intuitive approach to query formulation, thanks to supports for nested expressions and logic that make the query language as powerful as it is expressive. 

swiftdata_swift_developers_ios__xcode_tool_wwdc_visionOS_ulixegroup

SwiftData 2.0

SwiftData , then, continues to evolve, promising further innovations and improvements that will make backend development even smoother for iOS developers. This tool is confirmed as an indispensable resource for those seeking to build robust, high-performance applications within the Apple ecosystem. It is to make sure you don't miss any of the most important new features that we attended the latest edition of Swift Heroes for you, read the article!

Big libraries come with big responsibilities

Every year, Apple's WWDC proves to be a must-attend event, enriching the bitten apple ecosystem with a plethora of technological innovations. These innovations not only enrich the user experience but also place on the shoulders of us developers, the rewarding responsibility of exploring and integrating them into the applications that will shape the future. 

 

With tools like FinanceKit, TabletopKit and SwiftData 2.0, we have everything we need to push the boundaries of what is possible and create apps like never before.

Of all those presented in this article, perhaps the least exciting in my personal opinion is undoubtedly AccessorySetupKit, but we will see in the coming months the impact of this introduction and perhaps I will reevaluate this opinion (also in light of the impact of Swift Embedded). 

At the same time, the one with the most potential is definitely the one for visionOS: think of games such as D&D, Monopoly and many board games that will literally be able to "come to life" before our eyes, creating increasingly complete video game experiences. 

See you at work, ready to turn these opportunities into reality. See you soon from where every line of code opens a world of possibilities!

Pierpaolo Pignelli

The author of this article, has been working at Ulixe as an iOS developer since 2022. A graduate in Computer and Automation Engineering, he has been interested in IT since his teens and was weaned to the videludic world with a Game Boy Color, yellow. He is a lover of basketball and wellness and is an enthusiastic aspiring environmentalist.

Back to our blog to read Pierpaolo's upcoming articles!


See More Posts

background

Be My Eyes: The AI breakthrough for accessibility

Samuel Capano

background

WWDC 2024: New Libraries for iOS Developers

Pierpaolo Pignelli

background

From Ciphers to Computers: Enigma and the Cryptography Revolution.

Alessandra Bertini

Show more

Ulixe Group S.r.l. Copyright © Ulixe Group S.r.l. | Lungo Dora Pietro Colletta, 67, 10153, Turin, Italy | VAT IT03305250122 | Rea Number TO1173020