I'm currently facing the same issue (Also for fetching record IDs). As far as Apple stated here, this function can be used for creating shares, but I'm not sure if the NSPersistentCloudKitContainer is able to work with shared databases.
Topic:
App & System Services
SubTopic:
Core OS
Tags: