Objective-C Language Forward Declarations


Example

It's possible to declare protocol name without methods:

@protocol Person;

use it your code (class definition, etc):

@interface World : NSObject
@property (strong, nonatomic) NSArray<id<some>> *employees;
@end

and later define protocol's method somewhere in your code:

@protocol Person
- (NSString *)gender;
- (NSString *)name;
@end

It's useful when you don't need to know protocols details until you import that file with protocol definition. So, your class header file stays clear and contains details of the class only.