Troubleshooting SwiftData integration
Use the following table to diagnose common BlackBerry Dynamics SwiftData integration problems. Errors use the domain GDEncryptedIncrementalStoreErrorDomain with GDSecureDataStoreErrorCode raw values. Catch uniqueConstraintViolation (10012) and migrationFailed (10010) explicitly when you save or create the container.
|
Problem |
Recommended solution |
|---|---|
|
The app stops responding or displays "No schema registered for entity…" on the first insert |
A |
|
Container creation fails or stops responding at launch |
The container may have been created before the BlackBerry Dynamics authorization callback, so the secure container was not unlocked yet. Defer creation until after authorization. See Integrate SwiftData with your BlackBerry Dynamics app. |
|
Schema or model mismatch error at configuration initialization |
A |
|
|
A schema change may be too complex for automatic migration. Match the change against the guidance in Considerations for schema migration and add the indicated |
|
|
A save may have violated |
|
|
Two schemas that are active at the same time might declare entities with the same name. Prefix entity names per module (for example, |
|
Queries are slow on large data sets |
Review the |
|
|
A method was called on a closed or invalid store. Create the container again. |
|
|
The store could not be opened, or the container was not created through |
|
|
|