title: Which Swift types can be represented in Objective-C?
body: <p>I'm creating an NSManagedObject subclass in Swift and I get an error when I make an Optional property that's of type Int, Float or Double (and maybe others that I didn't try out).</p>
  
  <pre><code>@NSManaged var number: Float? //error:Property cannot be marked @NSManaged because its type cannot be represented in Objective-C
  @NSManaged var anotherNumber: Float //no error
  @NSManaged var array: NSArray? //no error
  @NSManaged var anotherArray: Array&lt;String&gt;? //no error
  </code></pre>
  
  <p>Which optional types can be represented in Objective-C? Why does the error not appear when I'm using a Swift Array or String (and when I'm not using an Optional Int or Double)?</p>