問題原因
在內建CoreData技術棧堆添加 Entity 之後點 Editor –> Create NSManegedObject Subclass
編譯時候, 報
clang: error: linker command failed with exit code 1 (use -v to see invocation)
這是由于Xcode在自動生成:
Person+CoreDataClass.h
Person+CoreDataClass.m
Person+CoreDataProperties.h
Person+CoreDataProperties.m
這四個檔案的時候, 頭檔案循環導入了:
解決
令生成的兩個 .m 檔案其中一個不編譯就可以了