error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _performSetupRequest:]_block_invoke(1149): <NSCloudKitMirroringDelegate: 0x6000015f0000>: Failed to set up CloudKit integration for store: <NSSQLCore: 0x138304190> (URL: file:///Users/username/Library/Group%20Containers/group.br.com.angelicameira.DateCounter/DateCounter.sqlite)
Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.cloudd was invalidated: failed at lookup with error 159 - Sandbox restriction." UserInfo={NSDebugDescription=The connection to service named com.apple.cloudd was invalidated: failed at lookup with error 159 - Sandbox restriction.}
Adding CloudKit.framework to the project fixes the issue
Fixes CloudKit sync error. From macOS Console:
Adding CloudKit.framework to the project fixes the issue