I am doing this as learning and I have been told that NSString return type type is not right.
Is it that the type should be (NSString*)not(NSString)
@protocol MyExampleProtocol <NSObject>
@required
@property (nonatomic,retain) NSString *model;
@property (nonatomic,retain) NSString *resgisteration;
-(NSString) getModelAndRegistration();
@optional
@property (nonatomic,retain) NSString *engine;
@property (nonatomic,retain) NSString *chasis;
-(NSString) getEngineAndChasis();
@end
Yes, you need to return a pointer to the NSString object since NSString is not a primitive type. Therefore you need to use
Also, drop the parentheses, these are not used in Objective-C