How to update iOS Widget data with server data via React Native app?

How to update iOS Widget data with server data via React Native app?


0

I have an existing React-Native application that queries data from a backend server (via GraphQL) based on the user that is logged into the app. I want to build a Widget Extension for iOS that displays one of the data points "live" (so ~15 min update interval) even when the main app is not running.

What is the best way to achieve that?

Via App Groups it is possible to share data between the react native app and the widget. However, when the app is in background, this data does not update. I thought about triggering a function that updates this data from the widget, however, i cannot find a possibility to expose functions from my react native app to the iOS Widget.

Another solution might be via APNs, but I don’t want to send a push notification every 15 seconds. Also it needs to be considered, that there are currently >10.000 apple user of my app that might use that widget.

Share

New contributor

Mr.Tobie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


Load 7 more related questions


Show fewer related questions

0

Reset to default



Browse other questions tagged

or ask your own question.

Leave a Reply

Your email address will not be published. Required fields are marked *