Unknown folder generated in Derived data

268 views Asked by At

I have a project which was working fine till I was working on my older MacBook. I am now working on new MacBook and the same project gives me build error. My friend also works on the new MacBook with same configuration and os but he is able to build it successfully. Error on my system is :

<unknown>:0: error: no such file or directory: '/Users/myuser/Library/Developer/Xcode/DerivedData/MyProject-dlhksnilacudcebpmorlzpzlkbid/Build/Intermediates.noindex/MyProject.build/Debug-iphoneos/MyProject.build/DerivedSources/CoreDataGenerated/Model/Model+CoreDataModel.swift'

Command CompileSwiftSources failed with a nonzero exit code

I have navigated to the path

'/Users/myuser/Library/Developer/Xcode/DerivedData/MyProject-dlhksnilacudcebpmorlzpzlkbid/Build/Intermediates.noindex/MyProject.build/Debug-iphoneos/MyProject.build/DerivedSources/CoreDataGenerated/Model'

There I found an unknown folder named "emplate" under which the required file exists.

I have searched the whole project, build settings, build phases, scripts but nowhere I found "emplate".

The CoreData entity Codegen has been specified as "Category/Extension".

2

There are 2 answers

2
Fayyaz Hussain On

Its better if you can install new version xcode or use same version of xcode which your friend is using, i think some path issues with your current xcode

0
Ank On

I have got the solution for this. Renamed and Moved Xcode from Desktop to Applications folder, clean the project , removed DerivedData folder. And it works.