I am trying to do mapping with Restkit and created 2 classes as below. I got the following errors:
- Unknown type name “Card” in Campaign.h
- Unknown type name “Campaign” in Card.h
- Property with ‘retain (or strong)’ attribute must be of object type
- … more but similar errors
My question is there a way to achieve below class declaration by re-using class.
Campaign.h
#import "Card.h"
@interface Campaign : NSObject
@property (nonatomic, strong) NSNumber* campaignId;
@property (nonatomic, strong) NSString* title;
@property (nonatomic, strong) Card* card;
@end
Card.h
#import "Campaign.h"
@interface Card : NSObject
@property (nonatomic, strong) NSNumber* cardId;
@property (nonatomic, strong) NSString* name;
@property (nonatomic, strong) Campaign* campaign;
@end
Just in case someone need it in future. Here my solution:
Campaign.h
Campaign.m
Card.h
Card.m