Post

Replies

Boosts

Views

Activity

Reply to Deprecations: SF Symbol...
It seems the symbol still display correct image, but I did some extra work in my code like below var theSymbol: UIImage if #available(iOS 14, *) {     theSymbol = UIImage(systemName: "arrow.triangle.2.circlepath") } else {     theSymbol = UIImage(systemName: "arrow.2.circlepath") }
Aug ’21
Reply to iOS 10: Failed to read values in CFPrefsPlistSource
May, 2022 For iOS SwiftUI Widget, I'm using App Group to share userDefaults between main app and widget, I saw same information like this, but only appear once, the second time widget retrieve info (via WidgetCenter.reloadTimelines) seems successful. Maybe we can define when read userDefaults failed, and treat this a Xcode log noise? [User Defaults] Couldn't read values in CFPrefsPlistSource<0x2824ee900> (Domain: ***, User: kCFPreferencesAnyUser, ByHost: Yes, Container: (null), Contents Need Refresh: Yes): Using kCFPreferencesAnyUser with a container is only allowed for System Containers, detaching from cfprefsd
May ’22
Reply to Variable WidgetBundle Configurations possible?
I found a workaround https://www.avanderlee.com/swiftui/variable-widgetbundle-configuration/ @main struct StockAnalyzerWidgets: WidgetBundle { @WidgetBundleBuilder var body: some Widget { widgets() } func widgets() -> some Widget { if #available(iOS 16.0, *) { return WidgetBundleBuilder.buildBlock(StockAnalyzerWatchlistWidgets(), StockAnalyzerSymbolWidgets()) } else { return StockAnalyzerWatchlistWidgets() } } } Any body using this in production environment?
Nov ’22