Could not determine generated file paths for CoreData code generation

后端 未结 11 1459
小蘑菇
小蘑菇 2021-01-01 11:23

While building my project for different target I am getting this error:

Could not determine generated file paths for Core Data code generation: Er

相关标签:
11条回答
  • 2021-01-01 11:38

    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.

    0 讨论(0)
  • 2021-01-01 11:41

    In my case I tried to build form an external drive. Copy the project to the internal drive, and it will work.

    0 讨论(0)
  • 2021-01-01 11:41

    In my case, I was saving a new version of .xdatamodelid in the pod project .xcworkspace instead of the original xcproject. Saving it in the original fix my problems.

    0 讨论(0)
  • 2021-01-01 11:43

    The answers given above are just right, but if these do not work, then:

    1. Make a copy of your model and store it somewhere
    2. Delete the model from Xcode
    3. Add the model again to whatever folder you want to add it to

    This solved my issue. Hope this helps.

    0 讨论(0)
  • 2021-01-01 11:44

    Similar to shallowThought's answer, I found I had to first uncheck the target, and then re-check it, and then re-build.

    0 讨论(0)
  • 2021-01-01 11:49

    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.

    0 讨论(0)
提交回复
热议问题