I have the same issue. I wonder, if sectionIdentifier and sortDescriptor have to be identical, how am I able to use only certain aspects of a field as sectionIdentifier?
Example 1: I have a model with a date field. I want to group/section by day. For that I created a computed property (with @objc so it's usabke as sectionIdentifier), that trims the date down to a String, representing the iso day of the date ("2022-10-25"). This isn't usable inside sortDescriptor. There I have to use the correct attribute, and then the app crashes.
Example 2: Having a title: String, wanting to group/section by first letter. Again I needed an @objc calculated property @objc var firstLetterOfTitle: String, and using \.title in sortDescriptors. Crash as soon as you change sort order.
Any ideas?
Post
Replies
Boosts
Views
Activity
Same version, same problem: created https://feedbackassistant.apple.com/feedback/11099784
I created a new token on Github, removed my existing github account from xcode preferences and added it using the token.
In preferences it worked, however everytime I open the "dependencies" I'm asked for a token (e.g. for https://github.com/apple/swift-algorithms.git). I choose my account, enter my token again and the dialogue closes, but pops up after a second.
If I enter a wrong token, I get the message "Authentication failed!".
If I enter the correct token, the dialogue disappears but comes back.
No package is actually added and it seems I'm unable to do so.
That's a bummer since it worked before but now I can't proceed with development.
I'm using Xcode 13.2.1
Hi,
I am getting this error when running unit tests in my actual code on:
Swift
try managedObjectContext.save()
= Thread 1: hit Objective-C exception
Changing everything to one shared PersistenceController didn't help. Same error.
If I follow the hint to set "Current Product Module" on my core data models, I'm getting a different error already earlier when I create a new entity:
Swift
let player = Player(context: managedObjectContext)
= Thread 1: "An NSManagedObject of class 'Player' must have a valid NSEntityDescription."
with the same log output as mentioned in OPs post.