While building my project for different target I am getting this error:
Could not determine generated file paths for Core Data code generation: Error Domain=NSCocoaErrorDomain Code=260 "No current version for model at path /Users/abc/Documents/Code/xyz-ios/ABC/iPhoneXMPP/SRT/Model.xcdatamodeld:" UserInfo={NSFilePath=/Users/abc/Documents/Code/xyz-ios/ABC/iPhoneXMPP/SRT/Model.xcdatamodeld, NSLocalizedDescription=No current version for model at path /Users/abc/Documents/Code/xyz-ios/ABC/iPhoneXMPP/SRT/Model.xcdatamodeld:}
Path mentioned in error is "
/Users/abc/Documents/Code/xyz-ios/ABC/iPhoneXMPP/SRT/Model.xcdatamodeld
" but "SRT" folder is inside "Temp" folder in my folder structure. How can I resolve this issue?
Similar to shallowThought's answer, I found I had to first uncheck the target, and then re-check it, and then re-build.
In Xcode, select your Model.xcdatamodeld
model and tick the checkbox "Target Membership" for your new target in the Inspector.
In My Case it was a result of Model.xcdatamodeld having conflicts when Merged with Remote (Source or Head). Somehow this conflict wasn't detected by GIT and slid through as Conflict Free.
Resolution: Open Model.xcdatamodeld as xml (with textEditor) and search for conflicts (>>>). Fix conflict and Save.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With