Update for Xcode 8:
In Xcode 8, one needs to go to the Core Data Model Editor and Show the File Inspector. Near the bottom is an option for code gen
I tested @NSManaged, it didn't work. :( . But mixed models files(.h) generated by xcdatamodel, it succeed. please read the doc and code in https://github.com/iascchen/SwiftCoreDataSimpleDemo