Generating Swift models from Core Data entities

前端 未结 7 1546
我在风中等你
我在风中等你 2020-12-08 09:36

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

7条回答
  •  猫巷女王i
    2020-12-08 09:52

    Editor -> Create NSManagedObject Subclass works fine for Swift

    Simply go through all the usual steps, but when you get to creating the files, choose Language 'Swift' if it's the first time you've used Create NSManagedObject Subclass with a Swift project it'll be defaulting to Objective C

提交回复
热议问题