Threading Issues with iOS 6.1 #409

Closed
chrisballinger opened this Issue Feb 7, 2013 · 7 comments

Comments

Projects
None yet
2 participants

As soon as I updated my device to iOS 6.1 I started having trouble with objects not saving to the proper thread's context (e.g. MR_contextForCurrentThread might not be working), and not being found when being fetched again from the same thread, even after calling MR_saveToPersistentStoreAndWait.

What's bothering me the most is that the same exact code worked fine on iOS 5.1.1.

Has anyone else seen problems on iOS 6.1?

Owner

casademora commented Feb 7, 2013

It'd help a little more if you posted some sample code. I have been using MagicalRecord on 6.1 without issue. We've still got to document some best practices.

Saul Mora
@casademora
saul@casademora.com

On Thursday, February 7, 2013 at 12:12 AM, Chris Ballinger wrote:

As soon as I updated my device to iOS 6.1 I started having trouble with objects not saving to the proper thread's context (e.g. MR_contextForCurrentThread might not be working), and not being found when being fetched again from the same thread, even after calling MR_saveToPersistentStoreAndWait.
What's bothering me the most is that the same exact code worked fine on iOS 5.1.1.
Has anyone else seen problems on iOS 6.1?


Reply to this email directly or view it on GitHub (#409).

It seems that some of my issues stemmed from using objectWithID: and/or objectRegisteredForID: instead of existingObjectWithID:, but I am still occasionally getting issues where fault's cannot be fulfilled, and confused as to why the behavior would be different on iOS 5 vs 6. I'll post more info later.

Owner

casademora commented Feb 7, 2013

Have a look at the experimental branch. There are some new methods there that address some of these issues (as I've run into them myself, and made some convenience methods to help)

Saul Mora
@casademora
saul@casademora.com

On Thursday, February 7, 2013 at 12:32 AM, Chris Ballinger wrote:

It seems that some of my issues stemmed from using objectWithID: and/or objectRegisteredForID: instead of existingObjectWithID:, but I am still occasionally getting issues where fault's cannot be fulfilled, and confused as to why the behavior would be different on iOS 5 vs 6. I'll post more info later.


Reply to this email directly or view it on GitHub (#409 (comment)).

Thanks for the tip!

Also, thanks for the quick response and AWESOME library! Working with Core Data is such a chore without MR.

Looks like everything is working fine after switching to existingObjectWithID:. Thanks!

Owner

casademora commented Feb 7, 2013

Check out the experimental branch and MR_objectWithID: it does some more exhaustive checking and logging

On Feb 7, 2013, at 1:14 PM, Chris Ballinger notifications@github.com wrote:

Looks like everything is working fine after switching to existingObjectWithID:. Thanks!


Reply to this email directly or view it on GitHub.

Cool, I'll take a gander

On Feb 7, 2013, at 2:42 PM, Saul Mora notifications@github.com wrote:

Check out the experimental branch and MR_objectWithID: it does some more
exhaustive checking and logging

On Feb 7, 2013, at 1:14 PM, Chris Ballinger notifications@github.com
wrote:

Looks like everything is working fine after switching to
existingObjectWithID:. Thanks!


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on
GitHubhttps://github.com/magicalpanda/MagicalRecord/issues/409#issuecomment-13266519.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment