NSFetchedResultsController ignores fetchLimit property

Originator:mplorentz
Number:rdar://30397335 Date Originated:2/7/17
Status:Open Resolved:
Product:iOS + SDK Product Version:iOS 10.2
Classification:Other Bug Reproducible:Always
 
Area:
Core Data

Summary:
NSFetchedResultsController does not respect the value of the fetchLimit property on the NSFetchRequest

Steps to Reproduce:
1. Create NSFetchRequest
2. Set fetchLimit on NSFetchRequest to 5
3. Create NSFetchedResultsController with the fetch request
4. Call performFetch on the fetched results controller
5. Add 6 objects to the data store


Expected Results:
Only 5 objects are displayed in the table view since the fetchLimit is set to 5.

Actual Results:
All 6 objects are displayed in the table view.

Version:
iOS 10.2

Notes:
In the attached sample app, tap the plus button 6 times to observe the issue described above.

Configuration:
iPhone 7

Attachments:
'NSFRCIgnoresFetchLimit.zip' was successfully uploaded.

Comments

Dupe of http://www.openradar.me/radar?id=5008804903124992 which is a dupe of http://www.openradar.me/16486972

By mplorentz at Feb. 7, 2017, 3:37 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!