-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Hello,
First of all, thank you for this great framework. I am trying to configure a UnconfiguredExternalAccessory
and the documentation says to
// device is an UnconfiguredExternalAccessory gotten from Discovery
device
.configure(on: viewController)
.sink(receiveCompletion: { completion
// Configuration has finished, either successfully or with an error
switch completion {
case .finished:
// All good, user finished setting up this device
case .failure(let error):
switch error {
case .cancelled:
// User cancelled the flow
case .failed:
// Something failed during the process
}
}
}, ...)
but there is no .configure(on:)
function on UnconfiguredExternalAccessory
and I can't find any reference to it in the code base.
I did see there is a UnconfiguredExternalAccessoryPublisher
that takes a view controller. Are we supposed to use that?
Something like this?
UnconfiguredExternalAccessoryPublisher(browser: browser, unconfiguredExternalAccessory: device, viewController: visibleViewController)
.sink { completion in
switch completion {
case .finished:
// All good, user finished setting up this device
break
case .failure(let error):
switch error {
case .cancelled:
// User cancelled the flow
break
case .failed:
// Something failed during the process
break
}
}
} receiveValue: { _ in
// never
}
.store(in: &subscriptions)
Metadata
Metadata
Assignees
Labels
No labels