0

I'm trying to build an app with a widget using GoogleAPIClientForREST and GoogleSignIn. WidgetKit is very limited to check for new data and I've seen the onBackgroundURLSessionEvents in WidgetConfiguration. As far as understand I need to make my API call in the WidgetExtension but adding the mentioned frameworks to the extension fails with building errors. I also stumbled upon Retrieve google user from iOS extension which mentions keychain sharing as a way to get you iOS app login in the extension. But this doesn't help me as well because I can not access GoogleSignIn framework.

tl;dr: How can I get data from Google in my widget extension?

Edit: I tested working with the BackgroundTask framework to update the iOS app every 15 minutes and then save the fetch result into shared user defaults. iOS does not guarantee that the task is executed so that is a very unreliable way to update.

Nico S.
  • 3,056
  • 1
  • 30
  • 64

0 Answers0