NSFetchedResultsController ignores fetchLimit property

Originator:josh
Number:rdar://30381905 Date Originated:2/6/2017
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

This is more or less a dupe of http://www.openradar.me/16486972


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!