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

App Crashes when using observable #349

Open
firecrackerz opened this issue May 10, 2019 · 1 comment
Open

App Crashes when using observable #349

firecrackerz opened this issue May 10, 2019 · 1 comment

Comments

@firecrackerz
Copy link

firecrackerz commented May 10, 2019

What

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'An instance of NSFetchedResultsController requires a fetch request with sort descriptors'

Context

let request : FetchRequest<DataObject> = FetchRequest<DataObject>()
    
                self.observable = db.observable(request: request)
                
                pedometerDataObservable.observe { (changes) in
                    switch changes {

                    case .initial(let objects):
                        print("\(objects.count) objects in the database")
                    case .update(let deletions, let insertions, let modifications):
                        print("\(deletions.count) deleted | \(insertions.count) inserted | \(modifications.count) modified")
                    case .error(let error):
                        print("Something went wrong", error.localizedDescription)
                    }
                }
@firecrackerz firecrackerz changed the title Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'An instance of NSFetchedResultsController requires a fetch request with sort descriptors'Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'An instance of NSFetchedResultsController requires a fetch request with sort descriptors' App Crashes when using observable May 10, 2019
@pepicrft
Copy link

@firecrackerz the project is no longer maintained so I encourage you to look for alternatives

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