Post

Replies

Boosts

Views

Activity

Reply to Intermittent crash when saving to Core Data
I am aware that a context should not be shared between threads. CoreDataManager I have a method called addChunkBuffer which stores the data from one of the peripherals as it has been processed. This method does the following: let context = CoreDataManager.shared.getContext() context.performAndWait { let samples = getSamples(context) … modify some of the samples … } CoreDataManager.shared.saveContext(context) See the attached file for the CoreDataManager class.
Dec ’21