Search code examples
ioswidgetios8ios-app-extension

Today Extension Widget content update


Suppose I am making a stock ticker widget (a.k.a. today extension). While the widget is visible on the screen, I want to periodically update the content every minute. My understanding is the widget cannot directly make networking calls and it cannot directly communicate with the containing app. The widget must get its content from the containing app. To get content from the containing app, the only way I know is sharing a common data store via a common App Group. Sure, I can use Background app refresh but background app refresh does not get call frequently enough and it is not guaranteed.

Is there any way to accomplish above requirement?


Solution

  • I just gave this a try - put a UIWebView in the widget and pull in a file - it works. This means widget can make direct network connection.

    Not sure about updating every minute - this does not seem like how Apple perceived widget should work.