title: RestKit RKAttributeMapping fromKeyPath Error on Archive
body: <p>I am using RestKit 0.26.0 in a mixed Swift / Obj C project. We are setting up relationship mappings in a Swift file, and when I run or build the project normally, everything works correctly. </p>
  
  <p>However, when I try to archive the app to upload for distribution, the archive fails due to problems with the attributeMappingFromKeyPath:toKeyPath:withMapping methods on RKAttributeMapping and RKRelationshipMapping. </p>
  
  <p>Specifically, when I archive, I get this error:</p>
  
  <p><code>'(fromKeyPath: String!, toKeyPath: String!) -&gt; RKAttributeMapping' is not convertible to '(fromKeyPath: String!, toKeyPath: String!) -&gt; RKAttributeMapping!'</code></p>
  
  <p>for this block of code:</p>
  
  <pre><code>let errorMapping = RKObjectMapping(forClass: RKErrorMessage.self)
          errorMapping.addPropertyMapping(RKAttributeMapping(fromKeyPath: nil, toKeyPath: "userInfo"));
  </code></pre>
  
  <p>I get the same/a very similar error whenever I use the attributeMappingFromKeyPath:toKeyPath method in other places as well: </p>
  
  <pre><code>mapping.addPropertyMapping(RKRelationshipMapping(fromKeyPath: "(userId).friends", toKeyPath: "friends", withMapping: friendsMapping))
  </code></pre>
  
  <p>yields this error:</p>
  
  <pre><code>'(fromKeyPath: String!, toKeyPath: String!, withMapping: RKMapping!) -&gt; RKRelationshipMapping' is not convertible to '(fromKeyPath: String!, toKeyPath: String!, withMapping: RKMapping!) -&gt; RKRelationshipMapping!'
  </code></pre>
  
  <p>Again, the app builds and runs in the simulator completely fine, with out raising any errors or warnings. Its just during the archive that the problem arises. I have tried all the simple 'common sense' solutions like cleaning the build folder, deleting derived data, etc. I've tried it on multiple computers and all of them do the same thing.</p>
  
  <p>EDIT: Just realized that the Archive build uses a different build configuration than my development build, when I change the build configuration for running the app to the same used in Archive, I get the same error, so there is simply something changed in the build config that is causing the issue.</p>