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?
Post
Replies
Boosts
Views
Activity
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
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
Hello,
I have a strange bug.
An extra tab bar button appears in the lower left corner of the tab bar; it has a label but no image. It duplicates the second tab bar button.
There is an identical issue in stack overflow, but none of the suggestions there apply to my case; but you can look at the image there to see what happens.
https://stackoverflow.com/questions/45757172/uitabbar-item-title-repeated-in-the-bottom-left-corner-visual-bug
To give you more details: this app has a storyboard with a UITabBarController subclass at its root. This subclass does nothing, except managing some global notification. No subclassing of uitabbar.
The tab bar controller has 4 items
All items are UINavigation controllers, whose root are different controllers
items 1 and 3 are pure UIKit, so we have a navigation controller and then some UIViewController subclasses
items 2 and 4 have a UINavigationController with a UIHostingController inside, and of course then it's SwiftUI
To reproduce the bug I need to: select items 2 or 4, which contain List elements
select a list item (NavigationLink) = a detail controller opens
navigate back from the detail controller
I have checked with debug view heirarchy and logs, I have verified that when I do these operations an extra UIBarButtonItem gets added.
Quite interestingly, if I do this on item 2 and then on item 4 I get two extra UIBarBUttons; but if I repeat the operation over and over again I don't get anything more. So ax extra button gets added once for each operation on items 2 and 4.
It looks like some weird interaction between UINavigationController, UITabBarController and SwiftUI views. Or maybe an iOs bug, who knows.
I have implemented a hackish way to traverse the hierarchy and remove the extra views, but I would like to remove the bug at its root.
Do you have any suggestion?
Hello,
I am dabbing my feet in core ML and I am not so sure about the best way to tackle a language processing issue.
I need to tokenize based on multiple words items.
IE: "I like Ferrari Testarossa"
In order to match "Ferrari Testarossa" I have tried two segmentation strategies:
["I","like","Ferrari Testarossa"]
["person", "like", "car"]
and
["I","like","Ferrari", "Testarossa"]
["person", "like", "car", "car"]
After generating the model, I realized that NSLinguisticTagger can only divide into words OR sentences (or bigger), nothing in between.
So with either strategies, If I type
"I love Lamborghini Contact"
I get
["I","love","Lamborghini","Contact"]
["person", "like","car","car"]
The first segmentation strategy (put tokens with 2 words in the same item) would be more suited to my UX, but I can deal with the second, it is quite trivial to join tags.
I was just wondering, which is the best way to feed the model generator, Machine Learning-wise?
Is there a difference in feeding the model "Ferrari Testarossa" and "Ferrari", "Testarossa" ?
Hello,
I am working on a Mac OS app to manage .abc files; these are plain text files (you can open them with TextEdit) that can be used to build music scores.
I cannot set document the and UTI properly in my project. When I tap +O , in the open dialog, .abc files are greyed out, so cannot choose them.
I am not the owner/inventor of the .abc format, so I am setting an exported UTI. Here are details from my plist.
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeIconSystemGenerated</key>
<integer>1</integer>
<key>CFBundleTypeName</key>
<string>ABC Music File</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSHandlerRank</key>
<string>Default</string>
<key>LSItemContentTypes</key>
<array>
<string>com.davidebenini.abc</string>
</array>
<key>NSDocumentClass</key>
<string>$(PRODUCT_MODULE_NAME).Document</string>
</dict>
</array>
And:
<key>UTImportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
</array>
<key>UTTypeDescription</key>
<string>ABC Music File</string>
<key>UTTypeIcons</key>
<dict/>
<key>UTTypeIdentifier</key>
<string>com.davidebenini.abc</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>abc</string>
<string>ABC</string>
</array>
</dict>
</dict>
</array>
I have been tweaking these settings a bit; I also tried using Exported UTI, but that was also to no avail.
Do you have any suggestions?
Thanks in advance,
Davide