While building my project for different target I am getting this error:
Could not determine generated file paths for Core Data code generation: Er
If you are using NSPersistentContainer, it is available from iOS 10+. You need to change the Target > General > Deployment Info > Deployment Target to 10.0+.
Then, Product > Clean & Build. It worked.