Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS 6 crash when merging save notification #145

Closed
roostr opened this issue May 31, 2014 · 4 comments
Closed

iOS 6 crash when merging save notification #145

roostr opened this issue May 31, 2014 · 4 comments

Comments

@roostr
Copy link

roostr commented May 31, 2014

Commit acf4657 broke the following code from Idiomatic sample app for iOS 6:

- (void)persistentStoreEnsemble:(CDEPersistentStoreEnsemble *)ensemble didSaveMergeChangesWithNotification:(NSNotification *)notification
{
    [managedObjectContext performBlock:^{
        [managedObjectContext mergeChangesFromContextDidSaveNotification:notification];
    }];
}

2014-05-30 19:14:18.641 App[710:907] -[_NSObjectID_64_7 objectID]: unrecognized selector sent to instance 0x1ede2d40

Confirmed that reverting acf4657 fixes it.

FYI: I also noticed that on iOS 6, this operation (merging the changes back into the UI context) doesn't work with acf4657 reverted. I have to force-close my app and restart it to see the model changes. This belongs in a separate issue, but I wanted to mention it here since it's relevant. Merging works fine on iOS 7.

@roostr
Copy link
Author

roostr commented May 31, 2014

It seems based on this documentation that passing real NSManagedObjects is the official way, so a revert of acf4657 may be best.

Still trying to figure out why the merge doesn't actually work.

@drewmccormack
Copy link
Owner

Hmm, that is odd. I made this change because it is how iCloud + Core Data does it. It includes the object ids, not be objects.

In general it is more convenient to have the object ids, because you can't really use the objects directly anyway.

Will try to reproduce the issue.

@roostr
Copy link
Author

roostr commented May 31, 2014

Let me know if you have issues reproducing it. For what it's worth, I can
reliably reproduce it using an iOS 6 simulator & Dropbox backend. I haven't
tested it with the Idiomatic app itself, but I am using very similar code.
It's possible it's my own error.

On Sat, May 31, 2014 at 1:11 AM, Drew McCormack notifications@github.com
wrote:

Hmm, that is odd. I made this change because it is how iCloud + Core Data
does it. It includes the object ids, not be objects.

In general it is more convenient to have the object ids, because you can't
really use the objects directly anyway.

Will try to reproduce the issue.


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

@drewmccormack
Copy link
Owner

I reverted this to provide NSManagedObjects instead. Just pull the master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants