Post

Replies

Boosts

Views

Activity

Reply to SwiftData with CloudKit Error: Error updating background task request
@DTS Engineer Albert, thanks for the response. Error Please see the screenshot of the fault log, Subsystem for the log iscom.apple.cloudkit Category for the log is Scheduler Answer to your questions: Cloud sync works and data gets synced, no issue with the data. Yes correct primary sync doesn't happen via BGTaskScheduler. However SwiftData / CloudKit initiates a background task to do some processing. The background is the one that gets blocked. This is a clean new project (no 3rd party libraries) and I have written the code so I am sure of that there is no background task I am initiating. Testing / Sample project: If you really want to test it, please refer to the project attached in FB22634797 Though FB22634797 is for a different issue, the Xcode project would throw the fault log in Xcode. It is a very simple project. Question It would be great if someone from SwiftData / CoreData / CloudKit team can confirm this.
Topic: App & System Services SubTopic: iCloud Tags:
Apr ’26
Reply to SwiftData with CloudKit Error: Error updating background task request
Just to be clear this is not a background task I have initiated. This is something done internally by SwiftData. That is the reason I would like to know the background task id. If I don't then the whole background processing would be blocked and defeats the purpose of the SwiftData background processing. This doesn't seem to be documented anywhere. Even if there is a way to debug this please let me know as symbolic breakpoints that I tried don't seem to work. Any help on this would be greatly appreciated.
Topic: App & System Services SubTopic: iCloud Tags:
Apr ’26
Reply to 'NSKeyedUnarchiveFromData' should not be used to for un-archiving and will be removed in a future release
@DTS Engineer Questions Can you confirm if it is ok to use ColorComponents as Coddle and ignore the fault log? 'NSKeyedUnarchiveFromData' should not be used to for un-archiving and will be removed in a future release Or what is the best approach? I could store it as Data, however having to decode every time seems to be expensive especially when displaying In a list. I am kind of stuck with this, could you please help, thanks!
Topic: App & System Services SubTopic: iCloud Tags:
Apr ’26
Reply to 'NSKeyedUnarchiveFromData' should not be used to for un-archiving and will be removed in a future release
@DTS Engineer could you please add CloudKit tag to this post, I am unable to add it, thanks! My Solution I have managed to get it working on the app target with ValueTransformer and NSSecureCoding but kind of seems odd to store just a normal struct using so much boilerplate code. Way to reproduce this The issue is not reproducible on SwiftData only. Only when you have SwiftData + CloudKit this occurs. CloudKit minimum reproducible code often requires turning on project setup with capabilities etc. Problem On the app target things work ok but for test cases there is a crash as it can't convert from Data to ColorRepresentation. I have the same file added to 2 different targets, not sure if it has anything with the names and module names because the error seems to suggest it. Error Domain=NSCocoaErrorDomain Code=4864 "value for key 'root' was of unexpected class 'ColorRepresentation' (0x10326c828) [/Users/homefolder/Library/Developer/CoreSimulator/Devices/E365C6A9-B19A-4A53-8885-05E9DE4D8B84/data/Containers/Bundle/Application/BE80DEBA-5FAF-496A-99CC-E60A8C72A096/WidgetStylesDemo.app]. Allowed classes are: {( "'ColorRepresentation' (0x103d98520) [/Users/homefolder/Library/Developer/CoreSimulator/Devices/E365C6A9-B19A-4A53-8885-05E9DE4D8B84/data/Containers/Bundle/Application/BE80DEBA-5FAF-496A-99CC-E60A8C72A096/WidgetStylesDemo.app/PlugIns/WidgetStylesDemoTests.xctest]" )}" UserInfo={NSDebugDescription=value for key 'root' was of unexpected class 'ColorRepresentation' (0x10326c828) [/Users/homefolder/Library/Developer/CoreSimulator/Devices/E365C6A9-B19A-4A53-8885-05E9DE4D8B84/data/Containers/Bundle/Application/BE80DEBA-5FAF-496A-99CC-E60A8C72A096/WidgetStylesDemo.app]. Allowed classes are: {( "'ColorRepresentation' (0x103d98520) [/Users/homefolder/Library/Developer/CoreSimulator/Devices/E365C6A9-B19A-4A53-8885-05E9DE4D8B84/data/Containers/Bundle/Application/BE80DEBA-5FAF-496A-99CC-E60A8C72A096/WidgetStylesDemo.app/PlugIns/WidgetStylesDemoTests.xctest]" )}} Documentation / Videos: I wish there are some documentation around SwiftData + CloudKit custom types.
Topic: App & System Services SubTopic: iCloud Tags:
Apr ’26
Reply to Navigation title flickers when tab is changed when used with a List / Form
Summary This is not a bug Closed Feedback Concept TabView needs to be the outermost container. NavigationStack should be in the Tab contents. Fixed Code struct ContentView: View { @State private var selectedTab = TabItem.red var body: some View { TabView(selection: $selectedTab) { ForEach(TabItem.allCases, id: \.self) { tab in Tab(tab.rawValue, systemImage: tab.systemImageName, value: tab) { NavigationStack { List { Text(tab.rawValue) } .navigationTitle(selectedTab.rawValue) } } } } } }
Topic: UI Frameworks SubTopic: SwiftUI
Dec ’25
Reply to #Predicate doesn't work with enum
I really hope this gets addressed in #WWDC25. Using a rawValue, you need to hardcode the rawValue, even the below wouldn't compile. #Predicate<Train> { $0.statusRawValue == Status.onTime.rawValue } Error: Key path cannot refer to enum case 'status' If the intent of SwiftData is to be modern and not expose the constraints of SQLite, then more needs to be done to improve support more swift types. Using a #Predicate seems like a blackbox, it works for simple primitive type comparisons but doesn't even work when trying to compare with something like Status.onTime.rawValue
Topic: App & System Services SubTopic: iCloud Tags:
May ’25
Reply to SwiftData with CloudKit Error: Error updating background task request
@DTS Engineer Albert, thanks for the response. Error Please see the screenshot of the fault log, Subsystem for the log iscom.apple.cloudkit Category for the log is Scheduler Answer to your questions: Cloud sync works and data gets synced, no issue with the data. Yes correct primary sync doesn't happen via BGTaskScheduler. However SwiftData / CloudKit initiates a background task to do some processing. The background is the one that gets blocked. This is a clean new project (no 3rd party libraries) and I have written the code so I am sure of that there is no background task I am initiating. Testing / Sample project: If you really want to test it, please refer to the project attached in FB22634797 Though FB22634797 is for a different issue, the Xcode project would throw the fault log in Xcode. It is a very simple project. Question It would be great if someone from SwiftData / CoreData / CloudKit team can confirm this.
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
Apr ’26
Reply to SwiftData with CloudKit Error: Error updating background task request
Just to be clear this is not a background task I have initiated. This is something done internally by SwiftData. That is the reason I would like to know the background task id. If I don't then the whole background processing would be blocked and defeats the purpose of the SwiftData background processing. This doesn't seem to be documented anywhere. Even if there is a way to debug this please let me know as symbolic breakpoints that I tried don't seem to work. Any help on this would be greatly appreciated.
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
Apr ’26
Reply to 'NSKeyedUnarchiveFromData' should not be used to for un-archiving and will be removed in a future release
@DTS Engineer Questions Can you confirm if it is ok to use ColorComponents as Coddle and ignore the fault log? 'NSKeyedUnarchiveFromData' should not be used to for un-archiving and will be removed in a future release Or what is the best approach? I could store it as Data, however having to decode every time seems to be expensive especially when displaying In a list. I am kind of stuck with this, could you please help, thanks!
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
Apr ’26
Reply to 'NSKeyedUnarchiveFromData' should not be used to for un-archiving and will be removed in a future release
@DTS Engineer could you please add CloudKit tag to this post, I am unable to add it, thanks! My Solution I have managed to get it working on the app target with ValueTransformer and NSSecureCoding but kind of seems odd to store just a normal struct using so much boilerplate code. Way to reproduce this The issue is not reproducible on SwiftData only. Only when you have SwiftData + CloudKit this occurs. CloudKit minimum reproducible code often requires turning on project setup with capabilities etc. Problem On the app target things work ok but for test cases there is a crash as it can't convert from Data to ColorRepresentation. I have the same file added to 2 different targets, not sure if it has anything with the names and module names because the error seems to suggest it. Error Domain=NSCocoaErrorDomain Code=4864 "value for key 'root' was of unexpected class 'ColorRepresentation' (0x10326c828) [/Users/homefolder/Library/Developer/CoreSimulator/Devices/E365C6A9-B19A-4A53-8885-05E9DE4D8B84/data/Containers/Bundle/Application/BE80DEBA-5FAF-496A-99CC-E60A8C72A096/WidgetStylesDemo.app]. Allowed classes are: {( "'ColorRepresentation' (0x103d98520) [/Users/homefolder/Library/Developer/CoreSimulator/Devices/E365C6A9-B19A-4A53-8885-05E9DE4D8B84/data/Containers/Bundle/Application/BE80DEBA-5FAF-496A-99CC-E60A8C72A096/WidgetStylesDemo.app/PlugIns/WidgetStylesDemoTests.xctest]" )}" UserInfo={NSDebugDescription=value for key 'root' was of unexpected class 'ColorRepresentation' (0x10326c828) [/Users/homefolder/Library/Developer/CoreSimulator/Devices/E365C6A9-B19A-4A53-8885-05E9DE4D8B84/data/Containers/Bundle/Application/BE80DEBA-5FAF-496A-99CC-E60A8C72A096/WidgetStylesDemo.app]. Allowed classes are: {( "'ColorRepresentation' (0x103d98520) [/Users/homefolder/Library/Developer/CoreSimulator/Devices/E365C6A9-B19A-4A53-8885-05E9DE4D8B84/data/Containers/Bundle/Application/BE80DEBA-5FAF-496A-99CC-E60A8C72A096/WidgetStylesDemo.app/PlugIns/WidgetStylesDemoTests.xctest]" )}} Documentation / Videos: I wish there are some documentation around SwiftData + CloudKit custom types.
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
Apr ’26
Reply to 'NSKeyedUnarchiveFromData' should not be used to for un-archiving and will be removed in a future release
This SwiftData is synced to CloudKit. Is there any requirement that custom property (struct) needs to implement / conform to any protocol? Seems find when it is just SwiftData without CloudKit sync, I feel the issue happens only with CloudKit
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
Apr ’26
Reply to Developer app on the Mac doesn't play videos in full screen
Thanks @DTS Engineer (Quinn) and @B347, yes it has been fixed, thanks a lot!
Replies
Boosts
Views
Activity
Mar ’26
Reply to Developer app on the Mac doesn't play videos in full screen
Thanks @DTS Engineer Quinn, I don't have a spare mac to update and try macOS 26.3 beta, would it be ok if I check once 26.3 is released? Thanks.
Replies
Boosts
Views
Activity
Jan ’26
Reply to AppIntents
@DTS Engineer Thanks a lot Ed! that was spot on, exactly what I wanted. I was breaking my head over this!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’26
Reply to Navigation title flickers when tab is changed when used with a List / Form
The current accepted answer is incorrect so please mark it as unanswered. Please have a look at the feedback FB21436493
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Dec ’25
Reply to Navigation title flickers when tab is changed when used with a List / Form
This actually is a valid bug, so I have a created a new bug, This is a valid use case Please Apple Engineers, please do have a look at this New Feedback: FB21436493 Also I wish I could deleted my reply to this.
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Dec ’25
Reply to Navigation title flickers when tab is changed when used with a List / Form
Summary This is not a bug Closed Feedback Concept TabView needs to be the outermost container. NavigationStack should be in the Tab contents. Fixed Code struct ContentView: View { @State private var selectedTab = TabItem.red var body: some View { TabView(selection: $selectedTab) { ForEach(TabItem.allCases, id: \.self) { tab in Tab(tab.rawValue, systemImage: tab.systemImageName, value: tab) { NavigationStack { List { Text(tab.rawValue) } .navigationTitle(selectedTab.rawValue) } } } } } }
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Dec ’25
Reply to Tapping on ShareLink crashes the app
See attached Gif
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’25
Reply to List Section with Swipe Action - glitches
Thanks @j_salling, seems related. I have filed a feedback as well. It would be great to have this fixed at the earliest as possible as it affects production apps.
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Nov ’25
Reply to List Section with Swipe Action - glitches
Following Gif shows the UI glitch
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Nov ’25
Reply to #Predicate doesn't work with enum
I really hope this gets addressed in #WWDC25. Using a rawValue, you need to hardcode the rawValue, even the below wouldn't compile. #Predicate<Train> { $0.statusRawValue == Status.onTime.rawValue } Error: Key path cannot refer to enum case 'status' If the intent of SwiftData is to be modern and not expose the constraints of SQLite, then more needs to be done to improve support more swift types. Using a #Predicate seems like a blackbox, it works for simple primitive type comparisons but doesn't even work when trying to compare with something like Status.onTime.rawValue
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
May ’25