Post

Replies

Boosts

Views

Activity

Reply to SwiftData iCloud sync breaks after disabling and re-enabling iCloud
UPDATE: After some time the sync fails again for no obvious reason and here is the error that appears in the console for a Mac app: CoreData: warning: CoreData+CloudKit: -[NSCloudKitMirroringDelegate finishedAutomatedRequestWithResult:](3599): Finished request '<NSCloudKitMirroringExportRequest: 0x600002d8c140> EF99499F-210C-4DB0-98F9-C10563CBD3D9' with result: <NSCloudKitMirroringResult: 0x6000000bcb10> storeIdentifier: 01B8CAF5-154B-47B9-81CC-5850C07D2836 success: 0 madeChanges: 0 error: Error Domain=NSCocoaErrorDomain Code=134417 "Request '<NSCloudKitMirroringExportRequest: 0x600002d8c140> EF99499F-210C-4DB0-98F9-C10563CBD3D9' was cancelled because there is already a pending request of type 'NSCloudKitMirroringExportRequest'." UserInfo={NSLocalizedFailureReason=Request '<NSCloudKitMirroringExportRequest: 0x600002d8c140> EF99499F-210C-4DB0-98F9-C10563CBD3D9' was cancelled because there is already a pending request of type 'NSCloudKitMirroringExportRequest'.} Is this a sync attempt that's being cancelled?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’24
Reply to SwiftData iCloud sync breaks after disabling and re-enabling iCloud
Well, after a while the other Mac with macOS 15.0.1 stopped syncing too. So the original report is still valid and I can reproduce it on two Macs with 15.0.1 and two iOS devices with iOS 18.1 b7. There is a simple project attached to FB15455847 which fails to sync after disabling / enabling iCloud and adding new items from all devices. Going through sysdiagnose again and following the steps in the article up to Execute the import All previous steps look fine but when it comes to enqueuing the request: default … 14:14:15.841814 … YourCoolApp CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _enqueueRequest:]_block_invoke(1003): <NSCloudKitMirroringDelegate: …>: enqueuing request: <NSCloudKitMirroringImportRequest: …> 2D00459F-8C08-4E9A-BC44-FCE1CD29A550 the enqueue fails with this: warning: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _enqueueRequest:]_block_invoke_2(1030): Failed to enqueue request: <NSCloudKitMirroringImportRequest: 0x600001108690> 7F8489DA-CBB1-47E7-AE6D-EF6F107B1E29 Error Domain=NSCocoaErrorDomain Code=134417 "Request '<NSCloudKitMirroringImportRequest: 0x600001108690> 7F8489DA-CBB1-47E7-AE6D-EF6F107B1E29' was cancelled because there is already a pending request of type 'NSCloudKitMirroringImportRequest'." UserInfo={NSLocalizedFailureReason=Request '<NSCloudKitMirroringImportRequest: 0x600001108690> 7F8489DA-CBB1-47E7-AE6D-EF6F107B1E29' was cancelled because there is already a pending request of type 'NSCloudKitMirroringImportRequest'.} and then it just loops over trying to execute that NSCloudKitMirroringImportRequest and failing: Request '<NSCloudKitMirroringImportRequest> ... was cancelled because there is already a pending request of type 'NSCloudKitMirroringImportRequest'. and the import never happens.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’24
Reply to SwiftData iCloud sync breaks after disabling and re-enabling iCloud
@DTS Engineer is it possible to escalate this? It's still happening in macOS 15.1.1 and I created a simple starter project where the problem is reproducible. Need to run the app on iOS and macOS and after a few minutes of using the app (creating items on iPhone and Mac) the sync breaks: https://www.icloud.com/iclouddrive/0f3lh5CfIuaE5Tb54PC5-gycg#SequoiaSync2 the logs only show this failure that I mentioned above: Request '<NSCloudKitMirroringImportRequest> ... was cancelled because there is already a pending request of type 'NSCloudKitMirroringImportRequest'.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’24
Reply to SwiftData iCloud sync breaks after disabling and re-enabling iCloud
UPDATE: After some time the sync fails again for no obvious reason and here is the error that appears in the console for a Mac app: CoreData: warning: CoreData+CloudKit: -[NSCloudKitMirroringDelegate finishedAutomatedRequestWithResult:](3599): Finished request '<NSCloudKitMirroringExportRequest: 0x600002d8c140> EF99499F-210C-4DB0-98F9-C10563CBD3D9' with result: <NSCloudKitMirroringResult: 0x6000000bcb10> storeIdentifier: 01B8CAF5-154B-47B9-81CC-5850C07D2836 success: 0 madeChanges: 0 error: Error Domain=NSCocoaErrorDomain Code=134417 "Request '<NSCloudKitMirroringExportRequest: 0x600002d8c140> EF99499F-210C-4DB0-98F9-C10563CBD3D9' was cancelled because there is already a pending request of type 'NSCloudKitMirroringExportRequest'." UserInfo={NSLocalizedFailureReason=Request '<NSCloudKitMirroringExportRequest: 0x600002d8c140> EF99499F-210C-4DB0-98F9-C10563CBD3D9' was cancelled because there is already a pending request of type 'NSCloudKitMirroringExportRequest'.} Is this a sync attempt that's being cancelled?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to SwiftData iCloud sync breaks after disabling and re-enabling iCloud
I added a sample project to the original submitted feedback, not sure how to attach it here.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to SwiftData iCloud sync breaks after disabling and re-enabling iCloud
Looks like the problem is tied to this specific Mac, because I updated another machine from 14.7 to 15.0.1 and the sync doesn't break there so far 🤔 As for sysdiagnose, I did a couple of those and not finding anything obvious.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to SwiftData iCloud sync breaks after disabling and re-enabling iCloud
Well, after a while the other Mac with macOS 15.0.1 stopped syncing too. So the original report is still valid and I can reproduce it on two Macs with 15.0.1 and two iOS devices with iOS 18.1 b7. There is a simple project attached to FB15455847 which fails to sync after disabling / enabling iCloud and adding new items from all devices. Going through sysdiagnose again and following the steps in the article up to Execute the import All previous steps look fine but when it comes to enqueuing the request: default … 14:14:15.841814 … YourCoolApp CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _enqueueRequest:]_block_invoke(1003): <NSCloudKitMirroringDelegate: …>: enqueuing request: <NSCloudKitMirroringImportRequest: …> 2D00459F-8C08-4E9A-BC44-FCE1CD29A550 the enqueue fails with this: warning: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _enqueueRequest:]_block_invoke_2(1030): Failed to enqueue request: <NSCloudKitMirroringImportRequest: 0x600001108690> 7F8489DA-CBB1-47E7-AE6D-EF6F107B1E29 Error Domain=NSCocoaErrorDomain Code=134417 "Request '<NSCloudKitMirroringImportRequest: 0x600001108690> 7F8489DA-CBB1-47E7-AE6D-EF6F107B1E29' was cancelled because there is already a pending request of type 'NSCloudKitMirroringImportRequest'." UserInfo={NSLocalizedFailureReason=Request '<NSCloudKitMirroringImportRequest: 0x600001108690> 7F8489DA-CBB1-47E7-AE6D-EF6F107B1E29' was cancelled because there is already a pending request of type 'NSCloudKitMirroringImportRequest'.} and then it just loops over trying to execute that NSCloudKitMirroringImportRequest and failing: Request '<NSCloudKitMirroringImportRequest> ... was cancelled because there is already a pending request of type 'NSCloudKitMirroringImportRequest'. and the import never happens.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to SwiftData iCloud sync breaks after disabling and re-enabling iCloud
@DTS Engineer is it possible to escalate this? It's still happening in macOS 15.1.1 and I created a simple starter project where the problem is reproducible. Need to run the app on iOS and macOS and after a few minutes of using the app (creating items on iPhone and Mac) the sync breaks: https://www.icloud.com/iclouddrive/0f3lh5CfIuaE5Tb54PC5-gycg#SequoiaSync2 the logs only show this failure that I mentioned above: Request '<NSCloudKitMirroringImportRequest> ... was cancelled because there is already a pending request of type 'NSCloudKitMirroringImportRequest'.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’24
Reply to SiftData with CloudKit testing
Have you deployed your schema to production?
Replies
Boosts
Views
Activity
Nov ’24
Reply to SwiftData iCloud sync breaks after disabling and re-enabling iCloud
After some trial and error I think I was able to fix it. And it looks like the reason was that I did not specify production vs development containers properly. If you are coming across similar issues look at this too - https://developer.apple.com/documentation/bundleresources/entitlements/com.apple.developer.icloud-container-environment
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’24
Reply to Can you get the new "soft" scroll edge effect for custom safe area inset views?
Same thing here, looks like .scrollEdgeEffectStyle is not working correctly in Beta 1: .safeAreaBar(edge: .bottom, content: { CustomToolbarView() }) .scrollEdgeEffectStyle(.soft, for: .bottom) no edge effect applied
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’25
Reply to How do you set the background color of a toolbar button in ios26?
ToolbarItem { Button { print("Button pressed") } label: { Image(systemName: "star") } .tint(.yellow) .buttonStyle(.glassProminent) } This will result in:
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Jul ’25
Reply to DefaultToolbarItem search in bottom bar
Ok, sorry Apple, solution found 🤦‍♂️ Need to use .searchToolbarBehavior(.minimize) and it goes back to icon only
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Oct ’25