【发布时间】:2016-02-04 10:45:08
【问题描述】:
我之前多次使用 coredata 创建了一个新项目,但我注意到较新的 Xcode 不允许我调试我的 NSManagedObject 上的属性,这些属性引用另一个不同的 NSManagedObject。
让我用一个例子来解释。 MLP 代表 MyLittleProject
我有以下物品:
MLPPerson+CoreDataProperties.h
@property (nullable, nonatomic, retain) MLPCard *card;
MLPCard+CoreDataProperties.h
@property (nullable, nonatomic, retain) NSString *cardID;
当我在代码中并尝试时:
NSLog(@“%@“, myPerson.card.cardID);
效果很好,但是当我尝试在调试控制台中打印时:
po myPerson.card.cardID
我收到一个错误:
错误:在“MLPPerson *”类型的对象上找不到属性“卡”
我很困惑,因为这曾经在我从事的旧项目中效果很好。
【问题讨论】:
标签: ios objective-c xcode debugging core-data