CloudKit and Xojo

Has anybody successfully used CloudKit functionality in Xojo apps? We’ve gotten stuck after adding the required entitlements, hardening, and signing the build . On app open there is an EXC_CRASH (Code Signature Invalid) error. This is despite the fact that the app is signed correctly as verified by spctl -a -t exec -vv and codesign --verify --deep -v

This is for distribution outside of the Mac App Store.

If somebody has solved this problem with their Xojo app please share your workflow.