Embed Widget in Network Extension

I have a VPN app that has an embedded Network Extension. I wish to create a Widget based on the Network Extensions status. i.e Connect and what server/Country.

If I take the traditional route of embedding the widget in the main app and call WidgetCenter.shared.reloadTimelines in the extension it works as expected, but ONLY if the parent app is still alive. The minute the parent app goes away calling WidgetCenter.shared.reloadTimelines does nothing.

I have tried embedding the plugin inside of the Network Extension plugin but this as expected does not work.

Is this a limitation of WidgetKit ( No ability to be updated from a running plugin)? Or is there a better way to update this widget


Replies

I’m not surprised that this isn’t working; this is likely an edge case that no one considered. Indeed, we saw similar problems with Today extensions back in the day (r. 25869716).

Unless someone else chimes in, my advice would be that you file a bug about this. Please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
Thanks for your reply

Here is the ticket number - FB9002170