I recently found a problem in my Compile Sources Build Phase, it was compiling MyDB.xcdatamodeld and MyDB.xcdatamodel into the build (probably left over from some migration between Xcode versions or something). This wasn't a problem until I recently started using a library that uses:
[NSManagedObjectModel mergedModelFromBundles:nil]
Which goes and finds both of the MyDB files and throws an error that it can't merge duplicate entities, similar to this issue Core Data: Error, "Can't Merge Models With Two Different Entities Named 'foo' ". The problem w/their solution though is that it involves deleting the app :)
I fixed the problem in my Build Phase (I removed the MyDB.xcdatamodel line) and if I do a fresh install of the app it works fine, but if I install the app over an existing install (ie an update) then I still get the same DB error about duplicate entities. I imagine this is because the MyDB.xcdatamodel file is still hanging out in the user's bundle.
So my question is: how can I remove this file from existing install's bundles?