-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integration with AccessorySetupKit #49
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for all the improvements here and incorporating AccessorySetupKit[ very cool to see that we already have a decent overlap here!
I only had a few smaller comments. Once we have resolved the SwiftLint errors, remaining TODOs we should be good to go. The only element that requires more attention would be the Swift6 actor issue with the requirement to trigger updates on the UI using @MainActor
; wondering if this or an other PR is the place to address this?
Sources/SpeziBluetooth/AccessorySetupKit/AccessorySetupKit.swift
Outdated
Show resolved
Hide resolved
Sources/SpeziBluetooth/Configuration/Apperance/DeviceVariantCriteria.swift
Show resolved
Hide resolved
4050bb1
to
c05d769
Compare
Select Sign to Run Locally Revert and some project changes Maintain Shadow state for observable state on MainActor Check on store if we are running on main already
… supported platform version
c05d769
to
0dcea17
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Integration with AccessorySetupKit
♻️ Current situation & Problem
With iOS 18, Apple introduced a new way of pairing and accessing Bluetooth accessories in a more privacy preserving way where the user can explicitly allow access to individual accessories. It includes additional UI components to present product images and human-readable names that are also shown in the settings app.
SpeziBluetooth adds first-hand support to interact with AccessorySetupKit. The new
AccessorySetupKit
module makes it easy to interact with AccessorySetupKit with more modern Swift paradigms. Further, it allows to easily access some state likepickerPresented
that supports SwiftUI observability out of the box.Additional, SpeziBluetooth types like
DiscoveryCriteria
orManufacturerIdentifier
can be easily converted to AccessorySetupKit types likeASDiscoveryDescriptor
andASCompanyIdentifier
. Further,DiscoveryCriteria
got additional supports for criteria that is supported by ASKit like matching for service data or manufacturer data by specifying aDataDescriptor
.Further, we add native support for a
BluetoothDevice
to define itsDeviceAppearance
which also supports to distinguish appearance by differentVariant
s. You use aDeviceVariantCriteria
to distinguish a physical Bluetooth device from other variants.DeviceVariantCriteria
has native support to apply it to aASDiscoveryDescriptor
. This allows to easily build yourASPickerDisplayItem
s to present the AccessorySetupKit picker UI.⚙️ Release Notes
AccessorySetupKit
Spezi Module for easier interaction with AccessorySetupKit.DiscoveryCriteria
andManufacturerIdentifier
to their AccessorySetupKit counterparts.DeviceApperance
model that lets you declare how physical devices of yourBluetoothDevice
implementation look like. These appearances can be easily mapped to a AccessorySetupKitASDiscoveryDescriptor
andASPickerDisplayItem
to have easy integration with AccessorySetupKit.📚 Documentation
The documentation catalog was updated and added two new articles around CoreBluetooth and AccessorySetupKit to make the landing page less cluttered and highlight the SpeziBluetooth DSL more clearly.
📝 Code of Conduct & Contributing Guidelines
By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines: