-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
When I run this sample code In Xcode 14.3. I get the following warnings:
- /sample-cloudkit-sharing/Sharing/ViewModels/ViewModel.swift:74:68 Non-sendable type '[CKRecordZone]' passed in implicitly asynchronous call to main actor-isolated function cannot cross actor boundary
- /sample-cloudkit-sharing/Sharing/ViewModels/ViewModel.swift:74:73 Non-sendable type 'CKRecordZone' in asynchronous access to main actor-isolated property 'recordZone' cannot cross actor boundary
- /sample-cloudkit-sharing/Sharing/ViewModels/ViewModel.swift:91:32 Non-sendable type 'CKRecord' returned by call from main actor-isolated context to non-isolated instance method 'save' cannot cross actor boundary
- /sample-cloudkit-sharing/Sharing/ViewModels/ViewModel.swift:91:32 Non-sendable type 'CKRecord' exiting main actor-isolated context in call to non-isolated instance method 'save' cannot cross actor boundary
- /sample-cloudkit-sharing/Sharing/ViewModels/ViewModel.swift:107:36 Non-sendable type '[CKRecord]' exiting main actor-isolated context in call to non-isolated instance method 'modifyRecords(saving:deleting:savePolicy:atomically:)' cannot cross actor boundary
- /sample-cloudkit-sharing/Sharing/ViewModels/ViewModel.swift:111:46 Non-sendable type 'CKRecord' returned by call from main actor-isolated context to non-isolated instance method 'record(for:)' cannot cross actor boundary
- /sample-cloudkit-sharing/Sharing/ViewModels/ViewModel.swift:160:46 Capture of 'zone' with non-sendable type 'CKRecordZone' in a
@Sendableclosure - /sample-cloudkit-sharing/Sharing/ViewModels/ViewModel.swift:175:67 Non-sendable type '[CKRecordZone]' returned by call from main actor-isolated context to non-isolated instance method 'allRecordZones()' cannot cross actor boundary
- /sample-cloudkit-sharing/Sharing/ViewModels/ViewModel.swift:191:36 Non-sendable type '[CKRecordZone]' exiting main actor-isolated context in call to non-isolated instance method 'modifyRecordZones(saving:deleting:)' cannot cross actor boundary
Until CKRecord, CKRecordZone become Sendable Types, what is a workaround for this sample code?
Metadata
Metadata
Assignees
Labels
No labels