Hi,
I am developing an app with CoreData + CloudKit and wanted my Widget to fetch data from CloudKit to display. Everything is working on iOS / watchOS, but on WidgetKit the result from my fetch is always empty.
I already configured the CloudKit capability on the Widget extension, then I am creating a new NSPersistentCloudKitContainer the and on
public func timeline(with context: Context, completion: @escaping (Timeline<Entry>) -> ()) {
I am trying to
let cardsFetch = NSFetchRequest<Card>(entityName: "Card")
do {
let cards = try persistentContainer.viewContext.fetch(cardsFetch)
the result is always 0 and the same fetch on iOS returns the data.
Is this supposed to work?