Xcode 9 generates different code for Date
type attribute of the entity in simulator vs device. I have codegen
feature under Class
set to category/extension
in coredata.
Until Xcode 8.3 (latest) it was all working fine (NSDate
always). Below is the auto generated code by Xcode 9 (Swift 4) for the attribute -
On Device:-
@NSManaged public var requiredDate: Date?
AND,
On Simulator:-
@NSManaged public var requiredDate: NSDate?
Anyone encountered this problem? What is the best solution for a project with 50+ members to fix this until an Xcode update fix it (I hope there is an apple radar for this)?