title: How can I get RTF content out of a core data transformable field on iOS?
body: <p>I am working on an iOS app which is going to handle many documents of about 40-80k each in a core data datastore.  For ease of data input, I put together a simple cocoa app that saves the contents of an NSTextView control to a transformable field in the store.</p>
  
  <p>I'm then opening the saved store in my iOS app and having problems.  When I try to use a UITextView control to access the fetched results from that field in the data store, the displayed text is a hex dump.  I'm guessing that the NSTextView in the cocoa app is saving RTF text to the field, and the UITextView is expecting to get plain text.</p>
  
  <p>I'm using a simple Master-Detail project for iPad right now to try and get at the data.  Here's the code for loading up data from the data store:</p>
  
  <pre><code>    self.detailDescriptionLabel.text = [[self.detailItem valueForKey:@"name"] description];
      self.detailTextView.text = [[self.detailItem valueForKey:@"text"] description];
  </code></pre>
  
  <p>When I run the app and look at the results, here's what I get as the content of the <code>detailTextView</code>:</p>
  
  <blockquote>
    <p>&lt;7b5c7274 66315c61 6e73695c 616e7369 63706731 3235325c 636f636f 61727466 31313338 5c636f63 6f617375 62727466 3437300a 7b5c666f 6e747462 6c5c6630 5c667377 6973735c 66636861 72736574 30204865 6c766574 6963613b 7d0a7b5c 636f6c6f 7274626c 3b5c7265 64323535 5c677265 656e3235 355c626c 75653235 353b7d0a 5c706172 645c7478 3536305c 74783131 32305c74 78313638 305c7478 32323430 5c747832 3830305c 74783333 36305c74 78333932 305c7478 34343830 5c747835 3034305c 74783536 30305c74 78363136 305c7478 36373230 5c706172 6469726e 61747572 616c0a0a 5c66305c 66733234 205c6366 30205468 69732069 73207468 6520776f 726b696e 6720636f 70792e7d></p>
  </blockquote>
  
  <p>I've tried using an <code>NSAttributedString</code> to get the data, but the <code>initWithRTFD:documentAttributes:</code> method doesn't appear to be available in iOS. </p>
  
  <p>I honestly don't care about it being RTF.  I just want to get text back out.</p>