I added a test variable to MainScreenRecs, and updated its value on the Button click, and that doesn't crash it, so I don't think it's a problem with the MainScreenRecs instance being locked or written to somewhere else. My guess is one of the SwiftUI views that is being shown/hidden by the true/false value of isViewingSideBySide is being shown while it's also locked somewhere, maybe?
Post
Replies
Boosts
Views
Activity
Quinn: This works, but why does SecItemAdd not require kSecClass? In the example https://developer.apple.com/documentation/security/certificate_key_and_trust_services/identities/storing_an_identity_in_the_keychain it says to use kSecClassIdentity, but this fails for me. Your example works, which doesn't include kSecClassIdentity.
Thank you for posting this! It's very helpful.
UIApplication Background Task Notes is here now:
https://developer.apple.com/forums/thread/85066
I think so--thanks for checking. Do you know why refreshResults gets called when the Set of results is empty? It seems to get called multiple times, and the first call has an empty Set.
Agreed! I'm kicking myself for not posting it at the time. I must've been in a hurry to get it working. I don't remember exactly what I did, but I found a comment in the code and I'm posting it below.
Hi Claude, thanks for the response. I don't think that's quite the same thing because there aren't UIKit views involved here; it's just values being passed from SwiftUI observable objects into variables being used by plain vanilla classes.
Thank you so much for answering, Kevin. This is really helpful and makes a lot of sense.