MegaManX
MegaManX

Reputation: 8918

How to move Core Data name.xcdatamodel from one folder to another?

It should be quite simple, i have created single view application with code data checked. It created name.xcdatamodel file for me. App development has progressed further and I want to move all model related files to model folder. I created model folder, moved name.xcdatamodel to it, added it to project.

It should be simple, expect compiler / linker is warning me:

oldLocation/name.xcdatamodeld/name.xcdatamodel/contents: warning: Missing file: oldLocation/name.xcdatamodeld/name.xcdatamodel/contents is missing from working copy

oldLocation/name.xcdatamodeld/.xccurrentversion: warning: Missing file: oldLocation/name.xcdatamodeld/.xccurrentversion is missing from working copy

This is really puzzling, i have gone through project settings to see, if there are any missing references that link to old location, but could not find any.

What is the deal here?

Upvotes: 2

Views: 1638

Answers (3)

shallowThought
shallowThought

Reputation: 19602

Xcode warns you of missing files in your local (Git) work-space. This seems to be a new "Feature" in Xcode8.

To get rid of the warning, simply commit your changes.

Upvotes: 2

Fabio Ritrovato
Fabio Ritrovato

Reputation: 2616

You should check in your target's Build Phases, if the Copy Bundle Resources one has still a reference to the old file...

Upvotes: 1

Windindi
Windindi

Reputation: 412

This usually occurs because the source control does not recognise the location change.

If you are using git just git rm on those files in the old location. Similarly for svn use svn rm.

Refresh status and the warning should be gone.

Upvotes: 2

Related Questions