Without seeing your code, my best guess is that you're not accessing the family
property of the TimelineProviderContext
passed into the TimelineProvider
.
Your TimelineProvider
should look something like:
struct MyProvider: TimelineProvider {
func snapshot(with context: Context, completion: @escaping (Entry) -> ()) {
fetchNewsArticles(for: context.family) { articles in
// ...
completion(...)
}
}
}
func fetchNewsArticles(for widgetFamily: WidgetFamily, completion: @escaping ... )
{
switch family {
case .systemSmall:
// ...
}
Apple Docs - TimelineProvider
Apple Docs - TimelineProviderContext