there are two protocols, each in its own file:
// PMAService.h
#import <Foundation/Foundation.h>
#import "PMAPost.h"
#import "PMAServiceProcessingDelegate.h"
@protocol PMAService <NSObject>
-(void)setupService;
-(BOOL)processPost:(PMAPost *)post withDelegate:(id<PMAServiceProcessingDelegate>)delegate;
@end
// PMAServiceProcessingDelegate.h
#import <Foundation/Foundation.h>
#import "PMAPost.h"
#import "PMAService.h"
@protocol PMAServiceProcessingDelegate <NSObject>
-(void)successfullyProcessedPost:(PMAPost *)post by:(id<PMAService>)service;
-(void)notProcessedPost:(PMAPost *)post by:(id<PMAService>)service withError:(NSError *)error;
@end
each of the protocols needs the opposite for a method declaration. as soon as i create the import in each of the files, the compiler is not able to compile anymore since it tells me that it cannot find one of the protocols.
error messages for PMAService.h
(for the #import statement of PMAServiceProcessingDelegate.h
)
- 'PMAServiceProcessingDelegate.h' file not found
error messages for PMAServiceProcessingDelegate.h
(one for each method declaration):
- Cannot find declaration for 'PMAService'
- Cannot find declaration for 'PMAService'
is there something i missed out? isn't it allowed to import protocols like this?