RestKit/RestKit — Issue #575: Current commit on development branch does not compile
Author: besi
Created: 2012-02-29 08:15:20+00:00
State: open

This is related to my [pull request #562](https://github.com/RestKit/RestKit/pull/562), which was rejected. Since I am now facing the same issue in another project I decided to open an issue.

This is the error I get, when I want to compile my project (which uses Arc):

/Users/me/myProject/RestKit/Code/Testing/RKMappingTest.m:80:12:{80:12-80:98}: error: no known instance method for selector 'initWithMapping:sourceObject:destinationObject:' [4]
return [[self alloc] initWithMapping:mapping sourceObject:sourceObject destinationObject:nil];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/me/myProject/RestKit/Code/Testing/RKMappingTest.m:84:12:{84:12-84:112}: error: no known instance method for selector 'initWithMapping:sourceObject:destinationObject:' [4]
return [[self alloc] initWithMapping:mapping sourceObject:sourceObject destinationObject:destinationObject];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.

Xcode tells me the following in the issue navigator:

- Compile `RKMappingTest.m`
- Automatic Reference Counting Issue
No known instance method for selector `initWithMapping:sourceObject:destinationObject:`
- Automatic Reference Counting Issue
No known instance method for selector `initWithMapping:sourceObject:destinationObject:`

My current workaround is to remove `RKMappingTest.m` and `RKMappingTestExpectation.h` from the RestKit target.