core data in a static library for the iPhone

后端 未结 8 1206
不知归路
不知归路 2020-11-28 02:07

I\'ve built a static library that makes heavy use of the Core Data framework. I can successfully use the library in my external project, but ONLY if I include the .xcdatamod

8条回答
  •  离开以前
    2020-11-28 02:36

    Sascha Konietzke's solution works well, but there is one important caveat that needs to be provided for it to work. The bundle containing the model needs to be loaded first, otherwise it will not be included in the array and merged in the MOM.

    In his case he has probably already accessed resources from the bundle therefore the bundle was already loaded prior to this code being executed.

提交回复
热议问题