You can use a protocol, like so:
- (instancetype) initWithKey: (NSString *) key; // I'm assuming the key is a string.
- (void) send;
- (void) processKey;
However, it's uncommon in Objective-C for initializers to be declared in a protocol, and to enforce the LSP you would need to type any method or function that used one of these classes as
id<kObject>, which is atypical given the use case.
Generally, there isn't really anything in Objective-C that can prevent a base class from being implemented or invoked. What I've done in the past is left comments in the header, and had the default implementation throw an exception. You won't get compile-time errors, but the code will still stop and you can enforce the constraints of your design that way.
I think of the Python motto, "We're all consenting adults" whenever dealing with abstract classes in Objective-C - it's on the programmer to enforce this given the highly dynamic and (practically) entirely public nature of Objective-C. I trust that if I say it shouldn't be done, it will be adhered to. Exceptions enforce this, even if a bit heavy handed. Alternatively, you can just have the methods return immediately too - making the class useless.
As an aside, you may have luck declaring the property as a
protected instance variable, should you not need other classes, methods, or functions to directly access the