Yeah, I got it to work, please see my answer above (flagged with a green check mark).
As for linking ReferenceFileDocument to a CoreData store, that wasn't a problem, I just store the database name in my model instance and serialize it as a JSON.
When I open an existing document, I pass the database name into NSpersistentContainer constructor.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: