magicalpanda / MagicalRecord

Super Awesome Easy Fetching for Core Data!
Other
10.8k stars 1.79k forks source link

Magical Record 3 and Long Running Tasks #1145

Closed somerobots closed 8 years ago

somerobots commented 8 years ago

Very happy user of MR 2.3 in my app for GitLab - www.somerobots.com !

I want to transition the App to MR 3.0, however there's just two things preventing me from doing so.

Trident App is built in Swift, how complete do you think is the auditing for nullability? I had a quick go integrating MR 3.0 into the app and lots of things that were previously returned as not optional are now optional - is this intentional?

Lastly, Trident app makes extensive use of Magical Records saveWithBlock functions. However, on occasion I have long running tasks that require me to carry a context around to save into. For example, multiple HTTP requests read from, and save into the same context. In Magical Record 2.3 I used the MR_localContext() and then I would save that context passing in the parent contexts option, making sure only to use the contexts thread for accessing and modifying entities. Reading MR 3.0 code, I'm not sure how to go about this (what is the safest way), can you give me any advice?