Posts

Post not yet marked as solved
2 Replies
Thanks for the help.This is where I'm reading fromfunc peripheral(_ peripheral: CBPeripheral, didUpdateValueFor characteristic: CBCharacteristic, error: Error?) { if ((error) != nil) { print("Error didUpdateValueFor: \(error!.localizedDescription)") return } if peripheral.identifier != bleperipheral?.identifier { print("GOT DATA BUT NOT FOR ME"); return } switch characteristic.uuid { case SMASHTAG_DATA_UUID: if let data = characteristic.value { Data += dataEtc etc.Its reading fine, but then just stops.
Post not yet marked as solved
2 Replies
Replied In Picker
I solved it.Picker(selection: $setting.whereami, label: Text("Location")) { ForEach(setting.locations) { location in Text(location.id).tag(location.id) } }Note that my location class needed to conform to Identifable, that was the problem.import Foundationimport SwiftUIstruct Location: Identifiable{ var id: String = "" }