Post

Replies

Boosts

Views

Activity

CoreData triggers incompatible model error while it shouldn't
Hello. I recently released a new version (2.6) of my CloudKit syncing CoreData based app. The new version uses v18 of my data model. V18 is exactly like v17, except for a new optional string field in one of the entities. I diffed the two model versions to be extra sure. During my test I did not encounter any crash, and I also tested automatic migration, installing 2.55 and building 2.6 on top of it. No troubles. However my crash logger reports a number of crashes among my users. It's not a huge numbers (10 users over about 900 or more) but I am surprised it crashes at all. The crash happens when I call NSPersistentCloudKitContainer.loadPersistentStores, I get this error in the completion block: The model used to open the store is incompatible with the one used to create the store" I always assumed these slight changes (new field added to an existing model) did not require a manual migration. Any suggestions?
1
0
611
Apr ’24
SwiftUI UITableView NSInternalInconsistencyException in M1 simulator
Hello, I have a weird bug that happens only on my M1 Mac mini when buiding for the simulator. It is the typical table view NSInternalInconsistencyException error: ** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'attempt to insert row 2 into section 0, but there are only 2 rows in section 0 after the update' The error is related to a table view instantiated and managed by SwiftUI so I have no control over datasources. The corresponding View has a list fed a fetched result, with this property: var recipes: FetchedResultsRecipe { fetchRequest.wrappedValue } The crash happens the I add an object to the NSManagedObjectContext that stores the app contents. It happens when performing a very simple and fundamental flow of my app (a recipes app: the action is "add a recipe", imagine that). I found the crash yesterday after moving the project to my new M1 Mac. I verified that there is no crash or warning on the device iPhone XR) or on my older 2018 MacBook Pro. Anyone with a suggestion, or similar bugs? Thanks, Davide
4
0
3.7k
Apr ’23
Xcode export for localization does not generate XLIFF
I have a complex project; it's got 10 targets and 5 languages so far (plus base localization). I have followed Apple documentation to extract the XLIFF files to pass to translators (Product / Export Localizations). The export seems to work, but if I inspect the generated xloc files I find no xliff: the "Localized Contents" folder is simply empty. This applies to all languages. No xliffs at all. So far I kinda managed by sending localizable.strings sources to translators, but they have been (rightly) complaining because the .strings format doesn't integrate well with their tools. I believe there is something wrong in my project, something that needs repairing, but I don't know where to start from. By the way, this is a commercial app, already generating revenue, so I am quite cautious when manipulating project settings and all. Do you have any suggestions? Cheers, Davide
2
0
1.3k
Jun ’22
CoreData triggers incompatible model error while it shouldn't
Hello. I recently released a new version (2.6) of my CloudKit syncing CoreData based app. The new version uses v18 of my data model. V18 is exactly like v17, except for a new optional string field in one of the entities. I diffed the two model versions to be extra sure. During my test I did not encounter any crash, and I also tested automatic migration, installing 2.55 and building 2.6 on top of it. No troubles. However my crash logger reports a number of crashes among my users. It's not a huge numbers (10 users over about 900 or more) but I am surprised it crashes at all. The crash happens when I call NSPersistentCloudKitContainer.loadPersistentStores, I get this error in the completion block: The model used to open the store is incompatible with the one used to create the store" I always assumed these slight changes (new field added to an existing model) did not require a manual migration. Any suggestions?
Replies
1
Boosts
0
Views
611
Activity
Apr ’24
SwiftUI UITableView NSInternalInconsistencyException in M1 simulator
Hello, I have a weird bug that happens only on my M1 Mac mini when buiding for the simulator. It is the typical table view NSInternalInconsistencyException error: ** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'attempt to insert row 2 into section 0, but there are only 2 rows in section 0 after the update' The error is related to a table view instantiated and managed by SwiftUI so I have no control over datasources. The corresponding View has a list fed a fetched result, with this property: var recipes: FetchedResultsRecipe { fetchRequest.wrappedValue } The crash happens the I add an object to the NSManagedObjectContext that stores the app contents. It happens when performing a very simple and fundamental flow of my app (a recipes app: the action is "add a recipe", imagine that). I found the crash yesterday after moving the project to my new M1 Mac. I verified that there is no crash or warning on the device iPhone XR) or on my older 2018 MacBook Pro. Anyone with a suggestion, or similar bugs? Thanks, Davide
Replies
4
Boosts
0
Views
3.7k
Activity
Apr ’23
Xcode export for localization does not generate XLIFF
I have a complex project; it's got 10 targets and 5 languages so far (plus base localization). I have followed Apple documentation to extract the XLIFF files to pass to translators (Product / Export Localizations). The export seems to work, but if I inspect the generated xloc files I find no xliff: the "Localized Contents" folder is simply empty. This applies to all languages. No xliffs at all. So far I kinda managed by sending localizable.strings sources to translators, but they have been (rightly) complaining because the .strings format doesn't integrate well with their tools. I believe there is something wrong in my project, something that needs repairing, but I don't know where to start from. By the way, this is a commercial app, already generating revenue, so I am quite cautious when manipulating project settings and all. Do you have any suggestions? Cheers, Davide
Replies
2
Boosts
0
Views
1.3k
Activity
Jun ’22