As the new feature is launched I also want to make user experience smoother in my app using the AccessorySetupKit. But my peripheral is not discoverable. But another ios device with same advertisement data is discoverable by AccessorySetupKit. I didn't find much information on the documents related to the third party connection. I'm not sure if the third party peripheral should be MFI supported or anything else is required.
Is there anything I'm missing here to fullfill the requirement, please let me know.
Below is the code i"m using to discover the peripheral. Once again iOS to iOS discovery is working, facing issue with third party peripheral is not discovering.
private var session = ASAccessorySession()
var pickerDismissed = true
private static let perepheral: ASPickerDisplayItem = {
let descriptor = ASDiscoveryDescriptor()
descriptor.bluetoothServiceUUID = PublisherClass.serviceUUID
return ASPickerDisplayItem(
name: "Test_Name",
productImage: UIImage(named: "sample")!,
descriptor: descriptor
)
}()
override func viewDidLoad() {
super.viewDidLoad()
self.session.activate(on: DispatchQueue.main, eventHandler: handleSessionEvent(event:))
}
@IBAction func presentPicker() {
session.showPicker(for: [Self.perepheral]) { error in
if let error {
print("Failed to show picker due to: \(error.localizedDescription)")
}
}
}
private func handleSessionEvent(event: ASAccessoryEvent) {
switch event.eventType {
case .accessoryAdded, .accessoryChanged:
guard let accessory = event.accessory else { return }
print("\(accessory)")
case .activated:
guard let accessory = session.accessories.first else { return }
print("\(accessory)")
case .accessoryRemoved:
print("Received event type accessoryRemoved)")
case .pickerDidPresent:
pickerDismissed = false
case .pickerDidDismiss:
pickerDismissed = true
default:
print("Received event type \(event.eventType)")
}
}
}
I also added these details in plist
NSAccessorySetupKitSupports
Bluetooth
NSAccessorySetupBluetoothServices
Post
Replies
Boosts
Views
Activity
while trying to use the external camera, ios is not detecting exposure setting of connected external camera and check isExposureModeSupported is always returning false. And capture image also don't have any exposure details. How can we use or change these settings