UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

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      

TAKE YOUR SKILLS TO THE NEXT LEVEL If you like Hacking with Swift, you'll love Hacking with Swift+ – it's my premium service where you can learn advanced Swift and SwiftUI, functional programming, algorithms, and more. Plus it comes with stacks of benefits, including monthly live streams, downloadable projects, a 20% discount on all books, and free gifts!

Find out 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.