title: Crash when adopting NSSecureUnarchiveFromDataTransformer for a Transformable property
body: <p>In iOS 12 Apple introduced <code>NSSecureUnarchiveFromDataTransformerName</code> for use on CoreData model entities' Transformable properties. I used to keep the Transformer Name field empty, which implicitly used <code>NSKeyedUnarchiveFromDataTransformerName</code>. This transformer is now deprecated, and keeping the field empty in the future will mean <code>NSSecureUnarchiveFromDataTransformerName</code> instead.</p>
  
  <p>In iOS 13, if that field is empty, you now get a runtime warning telling you the aforementioned. I couldn't find any documentation on this anywhere, the only reference I got was a WWDC 2018 Core Data Best Practices talk which briefly mentioned what I just said.</p>
  
  <p>Now I have a model with an entity which directly stores <code>HTTPURLResponse</code> objects in a Transformable property. It conforms to <code>NSSecureCoding</code>, and I checked in runtime that <code>supportsSecureCoding</code> is <code>true</code>.</p>
  
  <p>Setting <code>NSSecureUnarchiveFromDataTransformerName</code> for the Transformer Name crashes with this message:</p>
  
  <pre><code>Object of class NSHTTPURLResponse is not among allowed top level class list (
      NSArray,
      NSDictionary,
      NSSet,
      NSString,
      NSNumber,
      NSDate,
      NSData,
      NSURL,
      NSUUID,
      NSNull
  ) with userInfo of (null)
  </code></pre>
  
  <p>So it sounds like Transformable properties can only be of these top level objects.</p>
  
  <p>I tried subclassing the secure transformer and override the <code>allowedTopLevelClasses</code> property as suggested by the documentation:</p>
  
  <pre><code>@available(iOS 12.0, *)
  public class NSSecureUnarchiveHTTPURLResponseFromDataTransformer: NSSecureUnarchiveFromDataTransformer {
  
      override public class var allowedTopLevelClasses: [AnyClass] {
          return [HTTPURLResponse.self]
      }
  }
  </code></pre>
  
  <p>Then I'd imagine I can create a custom transformer name, set it in the model and call <code>setValueTransformer(_:forName:)</code> for that name, but I couldn't find API to set the default <code>NSKeyedUnarchiveFromDataTransformer</code> for my custom name in case I'm on iOS 11.</p>
  
  <p>Keep in mind, I'm using Xcode 11 Beta 5, but this doesn't seem to be related if I am to accept the meaning of the error I'm getting as stated.</p>
  
  <p>Appreciate any thoughts.</p>