Crash: looking for .momd file when using CustomMappingProvider #235

Closed
opened 2025-12-29 15:27:10 +01:00 by adam · 1 comment
Owner

Originally created by @mbain on GitHub (Oct 23, 2018).

I get the following crash when using a CustomMappingProvider:

❗ [CoreStore: Fatal Error] XcodeDataModelSchema.swift:57 from(modelName:bundle:migrationChain:)
  ↪︎ Could not find "Tocca.momd" from the bundle "io.tocca.ina". Other model files in bundle: 0 item(s) []

Both models are CoreStoreObjects, and I do not have a .xcmodeld file. As such, I don't have a good way to generate a .momd file. My understanding of the situation is that CoreStore should be able to handle the migration given the CustomMappingProvider, without a .momd file. Am I missing something?

Originally created by @mbain on GitHub (Oct 23, 2018). I get the following crash when using a CustomMappingProvider: ``` ❗ [CoreStore: Fatal Error] XcodeDataModelSchema.swift:57 from(modelName:bundle:migrationChain:) ↪︎ Could not find "Tocca.momd" from the bundle "io.tocca.ina". Other model files in bundle: 0 item(s) [] ``` Both models are CoreStoreObjects, and I do not have a .xcmodeld file. As such, I don't have a good way to generate a .momd file. My understanding of the situation is that CoreStore should be able to handle the migration given the CustomMappingProvider, without a .momd file. Am I missing something?
adam closed this issue 2025-12-29 15:27:11 +01:00
Author
Owner

@JohnEstropia commented on GitHub (Nov 3, 2018):

@mbain This usually means you are accessing CoreStore somewhere earlier than your DataStack creation, which would trigger creation of a lazy, default-configured DataStack. You can put a breakpoint inside get in public static var defaultStack: DataStack inside CoreStore.swift to see where in your code triggers the lazy creation.

@JohnEstropia commented on GitHub (Nov 3, 2018): @mbain This usually means you are accessing `CoreStore` somewhere earlier than your `DataStack` creation, which would trigger creation of a lazy, default-configured `DataStack`. You can put a breakpoint inside `get` in `public static var defaultStack: DataStack` inside *CoreStore.swift* to see where in your code triggers the lazy creation.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/CoreStore#235