0

I am looking for someway how to preserve methods which I add to my classes which are generated from Core Data. It should be mainly init methods but It could be other methods too. When I was looking best approach for this I found this question but It's a little old and I hope there is better solution now. So exists better solution?

Community
  • 1
  • 1
Libor Zapletal
  • 13,752
  • 20
  • 95
  • 182

1 Answers1

0

I think creating Categories like suggested in the accepted answer on the question you're referring to is a valid approach. The other option is to stop generating the files when you've reached a stable point for your entities. Normally they shouldn't keep changing too much (since that will introduce challenges with migrations etc). And if the changes are small enough (like adding a new property etc) its easy to do this manually.

You could also have a look at Moogenerator which I know a lot of ppl who are happy with.

oehman
  • 249
  • 4
  • 12