Closed hei9gag closed 6 years ago
Hi @hei9gag,
I'm not sure what's going on here. DATAStack doesn't listen to all the notifications. It listens to notifications for the NSManagedContext that's been saved.
@objc public lazy var mainContext: NSManagedObjectContext = {
let context = //...
//....
NotificationCenter.default.addObserver(self, selector: #selector(DATAStack.mainContextDidSave(_:)), name: .NSManagedObjectContextDidSave, object: context)
return context
}()
If you see in NotificationCenter.default.addObserver
we pass the context as the object. This means that only notifications for this context will be received.
Not sure what Instabug is doing internally.
Thanks @3lvis I have also checked the code and the notification part looks good to me too. I will check with Instabug again.
No problem, have a nice day and good luck!
This might be related https://github.com/3lvis/DATAStack/pull/112
Thanks it fixed the crash problem. Learn something new again.
Hi, I got some crashes when using DATAStack and Instabug together. It seems the crash related to DATAStack listen to all NSManagedObjectContext notification thrown by other parties. And cause bad memory address. Do you have any ideas how to fix it? Many thanks.