[PR #16] [MERGED] Fix FRCdelegate issue where invalid type is passed #446

Closed
opened 2025-12-29 15:32:11 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/JohnEstropia/CoreStore/pull/16
Author: @mac-cain13
Created: 10/6/2015
Status: Merged
Merged: 10/6/2015
Merged by: @JohnEstropia

Base: developHead: patch-1


📝 Commits (1)

  • d33aa9c Fix FRCdelegate issue where invalid type is passed

📊 Changes

1 file changed (+7 additions, -0 deletions)

View changed files

📝 CoreStore/Internal/FetchedResultsControllerDelegate.swift (+7 -0)

📄 Description

See also https://forums.developer.apple.com/thread/12184#31850

In my project NSFetchedResultsController starts throwing us NSFetchedResultsChangeTypes that are of value 0. This is not a valid value, if you switch over type when this occurs the first case is executed. Causing strange behavior and fatal application errors.

The current "dance" to avoid FRC issues is not enough, I'm affraid we have to add this extra check to avoid these issues.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/JohnEstropia/CoreStore/pull/16 **Author:** [@mac-cain13](https://github.com/mac-cain13) **Created:** 10/6/2015 **Status:** ✅ Merged **Merged:** 10/6/2015 **Merged by:** [@JohnEstropia](https://github.com/JohnEstropia) **Base:** `develop` ← **Head:** `patch-1` --- ### 📝 Commits (1) - [`d33aa9c`](https://github.com/JohnEstropia/CoreStore/commit/d33aa9c5cfaf6d977c2b683043cf1f4911e75b42) Fix FRCdelegate issue where invalid type is passed ### 📊 Changes **1 file changed** (+7 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `CoreStore/Internal/FetchedResultsControllerDelegate.swift` (+7 -0) </details> ### 📄 Description See also https://forums.developer.apple.com/thread/12184#31850 In my project `NSFetchedResultsController` starts throwing us `NSFetchedResultsChangeType`s that are of value `0`. This is not a valid value, if you switch over `type` when this occurs the first case is executed. Causing strange behavior and fatal application errors. The current "dance" to avoid FRC issues is not enough, I'm affraid we have to add this extra check to avoid these issues. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 15:32:11 +01:00
adam closed this issue 2025-12-29 15:32:11 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/CoreStore#446