Post

Replies

Boosts

Views

Created

Swift code didUpdateValueFor characteristic
I have the following code in my app, which reads a single byte send from a peripheral. I now want to read 20 bytes sent together from the peripheral. How do I change the swift code? func peripheral(_ peripheral: CBPeripheral, didUpdateValueFor characteristic: CBCharacteristic, error: Error?) { var u16: UInt8 u16 = UInt8((characteristic.value! as NSData).bytes.bindMemory(to: Int.self, capacity: characteristic.value!.count).pointee)// get input ascii value // let chart = Character(UnicodeScalar(u16))// make into a character //
1
0
406
Mar ’21
iPhone screen label
Is there a limit to the speed at which information can be printed in a label on the iPhone screen? I seem to recall reading that this rate is restricted until a developer joins the Apple Developers' Group. I am writing in Swift, using Xcode.
3
0
301
Feb ’21