Why Isn't Core Data Fetching My Data?

前端 未结 3 1467
温柔的废话
温柔的废话 2021-01-29 00:03

My data for for an entity\'s attribute is not being fetched upon restart or not being saved before quitting (could be either case). The bottom line is, the data is not showing

3条回答
  •  感情败类
    2021-01-29 00:47

    My guess would be that your are mixing up your managed object contexts. Inserting into one and attempting to save on another. Remove your Core Data associated methods in your view controller and just try going through your app delegate methods. The data will either then be saved correctly, or an error will be tossed by Core Data. Make sure to inspect any setup/save errors in your Core Data code.

提交回复
热议问题