You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 @Sendable closure
/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?
The text was updated successfully, but these errors were encountered:
When I run this sample code In Xcode 14.3. I get the following warnings:
@Sendable
closureUntil CKRecord, CKRecordZone become Sendable Types, what is a workaround for this sample code?
The text was updated successfully, but these errors were encountered: