2

I have an iOS application + a Notification Service Extension + a Widget. Whenever I update in the app something in UserDefaults, that is read by the widget and I call WidgetCenter.shared.reloadTimelines, the widget does update instantly.

If I try to update the widget from the Notification Service Extension using WidgetCenter.shared.reloadTimelines, it does not work, throwing the following error:

[widget] reloadTimelines(ofKind:) - remoteObjectProxy error: Couldn’t communicate with a helper application.

Has anyone had this problem? Any input is much appreciated.

Lehel Medves
  • 527
  • 1
  • 5
  • 15
  • Additionally, if I try to call "getCurrentConfigurations" from the Notification Service Extension, I get the following error: [widget] getCurrentConfigurations(_:) - remoteObjectProxy error: Couldn’t communicate with a helper application. failure(Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.chrono.widgetcenterconnection was invalidated." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.chrono.widgetcenterconnection was invalidated.}) – Lehel Medves Mar 16 '21 at 11:59

1 Answers1

2

As a follow-up, I've tried to call WidgetCenter.shared.reloadTimelines from my application right after receiving a silent push notification, but it does not update the widget if the app is not running in the foreground.

It does seem to perform the WidgetCenter.shared.reloadTimelines right after starting up the app again, as if it was blocked somehow.

Lehel Medves
  • 527
  • 1
  • 5
  • 15