开发者

XCode4 fails to generate NSManagedObject subclass properly

I created a model using the model Editor in XCode4. After a short 开发者_高级运维while I decided to rename my entities.

That worked well but when I try to generate a NSManagedObject sublass from them, XCode generate them with the old entity/class name.

Is this a known bug?


I solved it. This isn't a bug. If you click on the Entity you have to change the class name in the inspector, too.


Yes, this is a bug. I don't know if it has been reported yet, though. If not it should be. I have had the same problem. My solution, unfortunately, was to create a new model from scratch. Alternatively, you could try to modify the elements file in your .xcdatamodel file. However, this file is a proprietary format and is not guaranteed to work. You may create a bigger problem by trying to edit it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜