> On Jun 4, 2015, at 10:28 PM, Brendan Duddridge <[email protected]> wrote: > > But I get warnings that I have to add setters and getters for the properties > I don't want persisted. Is that the case? Do I really have to declare all my > properties as either @dynamic or I have to add setters and getters?
Use @synthesize to tell Xcode to generate getters/setters for the other properties. (@synthesize is optional in recent versions of Clang, so some people aren’t even aware of it. But in CBLModel.h I added a declaration to the @interface that tells the compiler to stop implicitly synthesizing properties. I did this because a lot of people ran into problems where they forgot to add “@dynamic” for a persistent property, and Xcode just silently made it a synthesized property without any warning, so their model class just behaved incorrectly. This was confusing and difficult to debug.) —Jens -- You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/1F8444FF-D3E6-45ED-911F-104447C58CED%40couchbase.com. For more options, visit https://groups.google.com/d/optout.
