Core Data: No sample code for queue confinement or nested contexts
| Originator: | quellish | ||
| Number: | rdar://14311048 | Date Originated: | Sat, 29 Jun 2013 04:36:12 GMT |
| Status: | Open | Resolved: | |
| Product: | Sample Code | Product Version: | |
| Classification: | Enhancement | Reproducible: | Not Applicable |
Summary: Within the sample code section of ADC/iOS Dev Center there is "ThreadedCoreData". This is a good example of the old model of thread confinement used prior to iOS 5. iOS 5 introduced the alternative, queue confinement, and with that nested contexts. This has many, many benefits. There is no sample code illustrating it's proper use. Creating a counterpart to ThreadedCoreData that shows the best practices for using queue confinement and nested contexts would be extremely helpful to the developer community. "Nested contexts make it more important than ever that you adopt the “pass the baton” approach of accessing a context (by passing a context from one view controller to the next) rather than retrieving it directly from the app delegate." This in particular should be illustrated by the sample code, as previous sample code and XCode Core Data templates actually do the opposite - which has some developers under the impression that putting the whole core data stack on the app delegate is a best practice. Steps to Reproduce: Expected Results: Actual Results: Regression: Notes:
Comments
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!