The dot files are generated by Xcode8. See WWDC2016. I ran into the same issue after having to delete derived data due to another issue.
Two possible fixes:
1) The recommended, modern approach
- Delete all generated NSManagedObject subclasses from your project, if exists.
- Set
Codegen
toClass Definition
in your.xcdatamodel
for all entities - Make sure
Module
is empty (“Global Namespace” in light gray) (workaround an Apple bug, see @Chris Hansons answer)
- Clean project
- Clean DerivedData folder
Note: Even you do not see the generated files in your project, Xcode has a reference to it, so you are able to write extensions and such. For instance:
extension MyEntity {
func doSomething() {
//
}
}
Also, you can command+click to the generated file within Xcode.
2) A rather paranoid but bullet-prove approach, ignoring the new Xcode features
- Delete all generated NSManagedObject subclasses from your project, if exists.
- Set
Codegen
toManual/None
in your.xcdatamodel
for all entities - Clean project
- Clean DerivedData folder
- Restart Xcode
- Manually generate
NSManagedObject
subclasses (in “Editor” menu) - Make sure those files are added to your project
- build
If your problem persists, repeat:
- Clean project
- Clean DerivedData folder
- Restart Xcode