Will Core Data Support Cursor‑Based Pagination in Upcoming Xcode Releases?
0 reputation · 02 Sept 2021, 02:29 UTC
Background
Core Data’s NSFetchRequest exposes fetchLimit and fetchOffset for pagination. While these map to SQL LIMIT and OFFSET, they become inefficient on tables with thousands or millions of rows, especially when the underlying store is SQLite. The current APIs also lack a stable cursor mechanism, so changing data between paged requests can lead to duplicates or gaps.
Unresolved Decision
Apple has not announced any cursor‑based pagination features for Core Data. The community wonders whether future Xcode releases will introduce such an API to address scalability and consistency concerns.
Questions
- Which Xcode version would need to introduce cursor‑based pagination for Core Data?
- What changes would be required in
NSFetchRequestto expose cursor semantics? - Will the existing
@FetchRequestproperty wrapper in SwiftUI adapt to cursor‑based pagination?