iandundas / WidgetIntentNotUpdatingApp

4 stars 1 forks source link

I'm experiencing the same issue #2

Open lgvv opened 8 months ago

lgvv commented 8 months ago

Hello. I'm experiencing the same issue. Have you resolved the problem?

https://www.reddit.com/r/swift/comments/18nzj59/swiftdata_main_app_not_updating_after_appintent

stephenfung98 commented 8 months ago

Hi @lgvv, I found this thread which has a workaround.

https://github.com/JuniperPhoton/Widget-Intermediate-Animation/issues/1

I haven't tried implementing it yet but there are comments that say it works.

lgvv commented 8 months ago

Thank you for fast reply!

stephenfung98 commented 8 months ago

@lgvv were you able to get it to work?

lgvv commented 8 months ago

@stephenfung98 I haven't resolved the issue yet. Even using container.mainContext didn't work.

I'm attempting to bypass the problem by saving data to UserDefaults and trying to synchronize the data in SceneDidBecomeActive. (I'm not sure if this will solve the problem.)

Alternatively, I'm considering using CoreData.

stephenfung98 commented 8 months ago

same, wasn't able to solve the issue. Currently implementing a workaround with user defaults.

lgvv commented 8 months ago

@stephenfung98

I haven't tried using UserDefaults as a workaround yet. If the problem is resolved, could you share the solution?

stephenfung98 commented 8 months ago

sure, happy to share if i get a working solution.