[RKObjectMapping addPropertyMapping:] crash in ios

just started few days back with RestKit, need your review, where i am wrong.. getting crash in ios app: *** Assertion failure in -[RKObjectMapping addPropertyMapping:]

@interface VGShowCheckIn : NSObject

@property (nonatomic,strong) NSNumber * ad_units;

@property (nonatomic,strong) VGShowDetails * program;

@interface VGShowDetails : NSObject

@property (copy, nonatomic) NSString *programTitle;

@property (copy, nonatomic) NSString *showId;

=======

RKObjectMapping *checkinMapping = [RKObjectMapping mappingForClass:[VGShowCheckIn class]];

[checkinMapping addAttributeMappingsFromDictionary:@{

                                                  @"ad_units" : @"ad_units",

                                                  @"program" : @"program"

                                                  }];





RKObjectMapping *showMapping = [RKObjectMapping mappingForClass:[VGShowDetails class]];

[showMapping addAttributeMappingsFromDictionary:@{

                                                  @"id"                                         :   @"showId",

                                                  @"title"                      :   @"programTitle",

                                                  }];

and app is crashing here : [checkinMapping addPropertyMapping:[RKRelationshipMapping relationshipMappingFromKeyPath:@"program" toKeyPath:@"program" withMapping:showMapping]];

and rest api response is:

{

data =     {

    "ad_units" = 3;

    program =         {

        id = SH017232340000;


        title = "Man v. Food Nation";
    }
 }

}

can any one guide me whats wrong in line: [checkinMapping addPropertyMapping:[RKRelationshipMapping relationshipMappingFromKeyPath:@"program" toKeyPath:@"program" withMapping:showMapping]];

crash issue: *** Assertion failure in -[RKObjectMapping addPropertyMapping:]

链接地址: http://www.djcxy.com/p/49206.html

上一篇: Git:如何在提交之间来回移动

下一篇: [RKObjectMapping addPropertyMapping:]在ios中崩溃