TEAM LICENSES: Save money and learn new skills through a Hacking with Swift+ team license >>

Ultimate Portfolio and Widgets - share info from Core Data & persistent storage migration

Forums > Videos

I have just been through the couple of videos regarding Widgets that Paul made last year. Very interesting stuff.

Of course what some, me included, would like to do is to link some data from their main app to the widget. I know that widgets are meant to be light on processing time and minimal interaction. If and until Apple provide some mechanism for transfering some data from the app to the widget in a convenient manner, there are a few ways that that could be achieve this, as suggested on other forums and discussions groups - namely a shared file access or using app user defaults.

If using Core Data and persistent storage, to be able to share the data between the app and the widget you need to have started the development with this in mind and set up an App Group from the outset.

I have also been following the Ultimate Portfolio videos, where the Core Data and persistent storage are in the App. To be able to add a widget that uses data from the App, it would be necessary to migrate (lightweight migration?) the persistent storage from the App to the App Group.

I hope that Paul will cover the creation of a widget in the Ultimate Portfolio videos (part 2 or part 3), and how we could migrate the persistent storage. At least that is my wish.

5      

Hacking with Swift is sponsored by Superwall.

SPONSORED Superwall lets you build & test paywalls without shipping updates. Run experiments, offer sales, segment users, update locked features and more at the click of button. Best part? It's FREE for up to 250 conversions / mo and the Superwall team builds out 100% custom paywalls – free of charge.

Learn More

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.