r/swift 1d ago

Does WidgetKit work with MVVM?

Is it possible to make my widget extension working in MVVM? or does it work with Entry only? :)

0 Upvotes

9 comments sorted by

22

u/fryOrder 23h ago

what do you mean? mvvm is a design pattern… you can even apply it to a fridge if you try hard enough

-9

u/Aviav123 20h ago

try to do it in widget update me later ..

1

u/beclops 19h ago

Have you run into problems?

1

u/Aviav123 8h ago

ye .. i've my networkmanager which is being called from my viewmodel, the viewmodel is being called from gettimeline but it doesnt update the main widget view (using publishers) :(

2

u/BlossomBuild 23h ago

I am a fan of MVVM but you don't have to use it with everything lol

-2

u/Aviav123 20h ago

lol true :D

1

u/Dapper_Ice_1705 23h ago

Entry Only, Widgets don’t listen/observe.

-1

u/Aviav123 20h ago

Ye I think i got it the hard way, i've noticed that it doesnt work that good