我曾经多次使用coredata创建了一个带有objective-c的新项目,但是我注意到新的Xcode不允许我调试我的属性,NSManagedObject这些属性引用了另一个不同的属性NSManagedObject.
让我举个例子来解释一下.MLP代表MyLittleProject
我有以下对象:
MLPPerson+CoreDataProperties.h
@property (nullable, nonatomic, retain) MLPCard *card;
MLPCard+CoreDataProperties.h
@property (nullable, nonatomic, retain) NSString *cardID;
Run Code Online (Sandbox Code Playgroud)
当我在代码中并尝试:
NSLog(@“%@“, myPerson.card.cardID);
它工作得很好,但是当我尝试在调试控制台中打印时:
po myPerson.card.cardID
我收到一个错误:
错误:在'MLPPerson*'类型的对象上找不到属性'card'
我很困惑,因为这曾经在我工作的旧项目中工作得很好.