invalid redeclaration in auto code generate NSManagedObject Subclass Swift 3

前端 未结 9 1533
情书的邮戳
情书的邮戳 2020-12-08 09:07

Using Version 8.1 of Xcode.

Create an entity named \"MapRegionObject\" in .xcdatamodeld file.

Using auto code generator, click Editor on the navigation bar -

9条回答
  •  感动是毒
    2020-12-08 09:41

    Close the project and follow the following instructions:

    1. Reveal in finder your database .xcdatamodeld file.
    2. on .xcdatamodeld file right click -> Show Package Contents, if(.xcdatamodel) is find again in the package again right click and 'Show Package Contents'. you should get 'contents' file.
    3. Open 'contents' in text edit.
    4. Command-F (codeGenerationType="class") and replace all matchings string with blank string.

    Save and open Xcode project again.Everything should work well.

提交回复
热议问题