Post

Replies

Boosts

Views

Activity

SectionedFetchRequest not updating order of Sections
I have a SectionedFetchRequest that almost works as expected. My data model has two Entities (Item and Attribute). Both entities have a name attribute and an order attribute. The Attribute entity has a to-One relationship to an Item called item. The Attribute entity also has a computed property:     @objc var sectionName: String {         get { return self.item.name } The SectionedFetchRequest's sectionIdentifier key is \Attribute.sectionName and the sortDescriptors keys are \Attribute.item.order and then \Attribute.order. This sorts groups of Attribute's into Sections ordered by the Attribute item's order property. Each section is then ordered by the Attribute's own order property. As expected, when the order property of any Attribute object in the results changes, that section of the View is updated to reflect the change. However, if any of the Attribute's related Item order properties change, the View is not updated. It almost seems like SectionedFetchRequest is handling the NSManagedObjectContextDidSave notifications for changes to Attribute objects, but ignoring changes to Item objects that that should cause the results order to be changed and therefore the View to be updated. Is this a bug in SectionedFetchRequest or is there a direct way that I can get the SectionedFetchRequest to change its state so SwiftUI can update the View as expected? When I make a change to an Item's order, I can force the results to be updated by dynamically changing the nsPredicate with something that's different, but something that does not actually change the results. However, it seems like there should be a more appropriate way to force the SectionedFetchRequest to update the order of the Sections even if no changes are made to the actual Attribute objects that fetched.
5
0
1.8k
Jul ’21
Using Passkeys on Apple.com
I have two AppleID's. I use one with my Apple developer account and the other is my primary AppleID that I mainly use for everything else. In the past, I have used them on separate MacBooks, but I am now trying to consolidate everything onto one MacBook. I have created a Passkey for my Apple.com store account and that works well. However, when I try to log into an Apple developer related site (e.g. developer.apple.com), it initially offers to use my personal Passkey with an option to use different AppleID. When I select "use a different AppleID" and select my developer AppleID, it only offers to allow me to log in with a password or with a QR code using a Passkey on a different device. Is it possible to set up a Passkey for my Apple developer account on the same MacBook that already has a Passkey set up for my Apple Store account? If so, what is the process to create it? If it helps, both of my AppleID's are members of the same Family. Thanks.
0
0
506
Jun ’24