No visible @interface for RKDynamicMapping declares the selector setObjectMapping: whenValueOfKeyPath: isEqualTo - Restkit 0.2

45 views Asked by At

Hi I'm trying to call setObjectMapping: whenValueOfKeyPath: isEqualTo on my dynamic mapping object. But it give me this error

No visible @interface for RKDynamicMapping declares the selector setObjectMapping: whenValueOfKeyPath: isEqualTo

RKDynamicMapping* dynamicMapping = [RKDynamicMapping new];
[dynamicMapping setObjectMapping:girlMapping whenValueOfKeyPath:@"type" isEqualTo:@"Girl"];

Where am I doing wrong ? Is it removed in RestKit 0.2 ?

1

There are 1 answers

0
Udaya Sri On BEST ANSWER

Finally I found the solution . we can use addMatcher: matcherWithKeyPath: expectedValue: ObjectMapping property of the RKDynamicMapping object

[dynamicMapping addMatcher:[RKObjectMappingMatcher matcherWithKeyPath:@"type" expectedValue:@"Girl" objectMapping:girlMapping]];