0

The Coredata classes has the the path /Users/myName/Private/Develop/test/test/Core Data/Sub Classes.
Xcode project shows the classes correctly in the /test/test/Core Data/Sub Classes folder

However when I generate NSManagedObject Subclass and compile, I get the duplicate classes error on one of the object classes MeterHub+CoreDataProperties.swift

So I deleted all the instances of that class from my Xcode project and ensured it does not exist in my hard drive.

When I compile I get the error:

<unknown>:0: error: no such file or directory: /Users/myName/Private/Develop/test/MeterHub+CoreDataProperties.swift 
<unknown>:0: error: no such file or directory: '/Users/myName/Private/Develop/test/MeterHub+CoreDataClass.swift'
Command 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1

'/Users/myName/Private/Develop/test' is the wrong path. It should be instead looking at '/Users/myName/Private/Develop/test/test/Core Data/Sub Classes/'

How do I set the path to look at the correct one: '/Users/myName/Private/Develop/test/test/Core Data/Sub Classes/', where all the other entity classes exist and work

Willeke
  • 14,578
  • 4
  • 19
  • 47
vrao
  • 545
  • 2
  • 12
  • 33
  • If **you** create the NSManagedObject subclasses you have to set codegen to `Manual/None`, see https://stackoverflow.com/questions/53104287/create-nsmanagedobject-subclass-make-a-new-error-in-my-project/53105066#53105066 – vadian Aug 13 '21 at 10:26
  • I did that. Thanks. I went to project, targets, build phases and found the redundant ones and deleted them and it works now. – vrao Aug 16 '21 at 21:02

0 Answers0