Post

Replies

Boosts

Views

Activity

Reply to Using isActivityFullscreen to build applications in xcode 16 will crash in ios 17
I encountered the same situation, but the version is Xcode 27 Beta 6, and the device is iOS 17. The minimal reproducible code is as follows: import SwiftUI import WidgetKit @main struct Xcode27LACrashApp: App { @Environment(\.isActivityFullscreen) private var isActivityFullscreen var body: some Scene { WindowGroup { Text(isActivityFullscreen ? "fullscreen" : "not fullscreen") } } } Crash info: dyld[712]: Symbol not found: _$s7SwiftUI17EnvironmentValuesV9WidgetKitE20isActivityFullscreenSbvg Referenced from: <6C188284-51F7-38B5-833C-13FDC11E4C2C> /private/var/containers/Bundle/Application/71A82AE6-495A-45AA-B823-A2E2597D6F6E/Xcode27LACrash.app/Xcode27LACrash.debug.dylib Expected in: <064E500D-3AE0-34EC-9759-52B592E7B15A> /System/Library/Frameworks/WidgetKit.framework/WidgetKit FB24532892
Aug ’26
Reply to iOS 26 Beta 3, UIGlassEffect corner radius
This is not even a bug. The cornerConfiguration appeared in the WWDC sessions, but until now, it does not exist in UIKit. In Beta 2, we could use layer.cornerRadius to simulate its behavior, but in Beta 3 it doesn’t work anymore. It’s really annoying for developers who want to use this new feature, but Apple didn’t tell us this feature is just in the video.
Topic: UI Frameworks SubTopic: UIKit Tags:
Jul ’25
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?
Topic: Programming Languages SubTopic: Swift Tags:
Nov ’22
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: xxx, User: kCFPreferencesAnyUser, ByHost: Yes, Container: (null), Contents Need Refresh: Yes): Using kCFPreferencesAnyUser with a container is only allowed for System Containers, detaching from cfprefsd
Topic: App & System Services SubTopic: Core OS Tags:
May ’22
Reply to Using isActivityFullscreen to build applications in xcode 16 will crash in ios 17
I encountered the same situation, but the version is Xcode 27 Beta 6, and the device is iOS 17. The minimal reproducible code is as follows: import SwiftUI import WidgetKit @main struct Xcode27LACrashApp: App { @Environment(\.isActivityFullscreen) private var isActivityFullscreen var body: some Scene { WindowGroup { Text(isActivityFullscreen ? "fullscreen" : "not fullscreen") } } } Crash info: dyld[712]: Symbol not found: _$s7SwiftUI17EnvironmentValuesV9WidgetKitE20isActivityFullscreenSbvg Referenced from: <6C188284-51F7-38B5-833C-13FDC11E4C2C> /private/var/containers/Bundle/Application/71A82AE6-495A-45AA-B823-A2E2597D6F6E/Xcode27LACrash.app/Xcode27LACrash.debug.dylib Expected in: <064E500D-3AE0-34EC-9759-52B592E7B15A> /System/Library/Frameworks/WidgetKit.framework/WidgetKit FB24532892
Replies
Boosts
Views
Activity
Aug ’26
Reply to AlarmKit authorizationState is always notDetermined even if permission has been previously granted
Until beta 4, there were two ways to get the real AlarmKit authorization state: First: authorizationUpdates for await state in AlarmManager.shared.authorizationUpdates { // this state is correct } Second: The requested result, but possibly with an alert let state = try await AlarmManager.shared.requestAuthorization()
Replies
Boosts
Views
Activity
Jul ’25
Reply to iOS 26 Beta 3, UIGlassEffect corner radius
This is not even a bug. The cornerConfiguration appeared in the WWDC sessions, but until now, it does not exist in UIKit. In Beta 2, we could use layer.cornerRadius to simulate its behavior, but in Beta 3 it doesn’t work anymore. It’s really annoying for developers who want to use this new feature, but Apple didn’t tell us this feature is just in the video.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Jul ’25
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?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Nov ’22
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: xxx, User: kCFPreferencesAnyUser, ByHost: Yes, Container: (null), Contents Need Refresh: Yes): Using kCFPreferencesAnyUser with a container is only allowed for System Containers, detaching from cfprefsd
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
May ’22