Could not create bundle folder for versioned model

2019-02-09 15:30发布

I received project from other developer. Then i opened iOS project in Xcode and build it, i got error as below:

Volumes/Macintosh D/My workspace/HCProject/Model/HealthCareModel.xcdatamodeld:0: error: 
Could not create bundle folder for versioned model at
'/Users/TomMac/Library/Developer/Xcode/DerivedData/HCProject-bdxarurbgcdbaecxaoocaroetsjt/Build/Products/Debug-iphoneos/HCProject.app/HealthCareModel.momd'

Sorry if this is a basic question,please help me out. Thanks a lot.

标签: iphone ios ios6
9条回答
ら.Afraid
2楼-- · 2019-02-09 15:56

In my case it was a duplicate version of the data model. Right click on the .xcdatamodel file in your project explorer and select "Show in Finder". Check for duplicates and delete them.

查看更多
趁早两清
3楼-- · 2019-02-09 16:00

In my case my testsFileName.xctest (in workspace > Products > testsFileName.xctest) somehow has the application target as his target membership.

查看更多
【Aperson】
4楼-- · 2019-02-09 16:04

In my case I had to follow two steps to get this entirely fixed:

  1. Delete the problematic version's hidden files. Note that FILENAME.xcdatamodeld is a folder and if you browse it you'll see the different versions you have there. The one that gave me the error was still there so I first had to look for hidden files and then delete it.

  2. Clean Xcode's DerivedData folder as suggested by others here.

Hope this helps folks.

查看更多
登录 后发表回答