-
Notifications
You must be signed in to change notification settings - Fork 2
Question re: MdocReader #51
Description
Are the MdocReader and related Ble and BleConnection classes intended to support the creation of an mdL Verifier on iOS?
I have attempted to get this working by scanning a QR code presented by the EUDI wallet. Here is an example of what the EUDI wallet QR code provides:
mdoc:owBjMS4wAYIB2BhYS6QgAQECIVgg86qzNIr2qiktlGI2oGyEykvPWsIzZAgjQkKthPBlp88iWCB2YHkb-xvYQOwW6sqi5mRFBQ6OXnp6-nZTNsmZPvYhuwKBgwIBowD1AfQKUAAAY3EAABAAgAAAgF-bNPs
When I run my App (SwiftUI code shown below) an error:
Generic(value: "the device did not transmit a central client uuid")
The EUDI wallet always goes into peripheral mode and thus it will not provide a central client uuid. It would appear that the mobile-sdk-swift implementation assumes that it will be the peripheral.
Am I understanding things correctly? Is there a plan to support Central mode for the MdocReader?
import SwiftUI
import MobileSdkFramework
class MyBleReaderSessionStateDelegate : BLEReaderSessionStateDelegate {
func update(state: BLEReaderSessionState) {
print("bleSessionStateDelegate: \(state)")
}
}
struct ContentView: View {
@State var path: [String] = []
var body: some View {
NavigationStack(path: $path) {
ZStack {
VStack {
Button("Scan QR Code") {
path.append("Scan QR Code")
}
}
}
.navigationDestination(for: String.self) { value in
QRCodeScanner(
onRead: { qrCode in
print("QR Code: \(qrCode)\n")
path.removeAll()
let requestedItems: [String: [String: Bool]] = ["org.iso.18013.5.1": ["given_name": true]]
MDocReader(callback: MyBleReaderSessionStateDelegate(), uri: qrCode,requestedItems: requestedItems, trustAnchorRegistry: nil);
},
onCancel: {
print("QR Code Scan cancelled\n")
path.removeAll()
}
)
.navigationBarBackButtonHidden()
}
.navigationTitle("mDoc Reader")
}
}
}My App's Info.plist file has:
<key>NSBluetoothAlwaysUsageDescription</key>
<string>Secure transmission of mobile DL data</string>I never see a prompt asking for permission for BlueTooth.
The app's settings does not show a switch for BlueTooth.
I expect that the app never prompts for permission because it fails parsing the URI from the qrCode and never actually attempts bluetooth communications.