Post

Replies

Boosts

Views

Activity

Reply to "Discover Observation in SwiftUI" session has a bug
Yes, I'm seeing this too. var timer: AnyCancellable? is throwing the same error: @Observable requires property 'timer' to have an initial value (from macro 'Observable') EDIT: In my case making the timer: AnyCancellable? = nil removes the error Here's my code: @Observable class SubscriberViewModel { public var count: Int = 0 var timer: AnyCancellable? func setupTimer() { timer = Timer .publish(every: 1, on: .main, in: .common) .autoconnect() .sink { [weak self] _ in self?.count += 1 } } }
Jun ’23
Reply to iOS 16 - Scanning barcode
@rabi Are you under the impression that all combinations of metadataObjectTypes will work again in iOS 16 beta 3? For example, the following is likely to work again?  output.metadataObjectTypes = [AVMetadataObject.ObjectType.qr,                                                   AVMetadataObject.ObjectType.dataMatrix,                                                   AVMetadataObject.ObjectType.ean13,                                                   AVMetadataObject.ObjectType.ean8,                                                   AVMetadataObject.ObjectType.upce,                                                   AVMetadataObject.ObjectType.code39,                                                   AVMetadataObject.ObjectType.code39Mod43,                                                   AVMetadataObject.ObjectType.code93,                                                   AVMetadataObject.ObjectType.code128,                                                   AVMetadataObject.ObjectType.pdf417]
Oct ’22