Thank you for your help. Your input did put me onto the entitlements. I did run syspolicy_check on my app that I purchased. When I ran it with notary-submission, I got
AppleMobileFileIntegrity Error
Severity: Fatal
Full Error: No matching profile found
Type: Distribution Error
When I ran it with distribution, I got
Notary Ticket Missing
File: MyApp.app
Severity: Fatal
Full Error: A Notarization ticket is not stapled to this application.
Type: Distribution Error
Actually, there may be another method to fix this. I have been experimenting replacing my UIKit ViewController and CollectionView with a SwiftUI view using @query. I wonder if this will help.
I see what you are saying finally about the use of ModelActor. That would solve another concurrency issue as it turns out. Thank you for your assistance.
@FPST I am delving into your excellent suggestion. I had issues with what turned out to be the FetchDescriptor for the fetch function. It appears that it needs to be the simplest of FetchDescriptors, so no SortDescriptors.
@FPST let fetchDescriptor = FetchDescriptor() works fine, but
let fetchDescriptor = FetchDescriptor(sortBy: [SortDescriptor( .title)])
fails with
The operation couldn’t be completed. (SwiftData.SwiftDataError error 1.)
@FPST This does not return any PersistentIdentifiers unless the FetchDescriptor is
FetchDescriptor().
As I mentioned before, the sort does not work on PersistentIdentifiers. I had to fetch models using the sort and then stuff an array with the PersistentIdentifiers.
@Frameworks Engineer So, I can fetch models with the SortDescriptor, but not the identifiers with the SortDescriptor because there are pending changes in the ModelContext. I guess, my question is why didn't the model fetch fail if there are pending changes, but the identiifier fetch does. But I will do as you suggest and get back with you.
Thank you for your help. Your input did put me onto the entitlements. I did run syspolicy_check on my app that I purchased. When I ran it with notary-submission, I got
AppleMobileFileIntegrity Error
Severity: Fatal
Full Error: No matching profile found
Type: Distribution Error
When I ran it with distribution, I got
Notary Ticket Missing
File: MyApp.app
Severity: Fatal
Full Error: A Notarization ticket is not stapled to this application.
Type: Distribution Error
Actually, there may be another method to fix this. I have been experimenting replacing my UIKit ViewController and CollectionView with a SwiftUI view using @query. I wonder if this will help.
I see what you are saying finally about the use of ModelActor. That would solve another concurrency issue as it turns out. Thank you for your assistance.
@FPST I am delving into your excellent suggestion. I had issues with what turned out to be the FetchDescriptor for the fetch function. It appears that it needs to be the simplest of FetchDescriptors, so no SortDescriptors.
@FPST let fetchDescriptor = FetchDescriptor() works fine, but
let fetchDescriptor = FetchDescriptor(sortBy: [SortDescriptor( .title)])
fails with
The operation couldn’t be completed. (SwiftData.SwiftDataError error 1.)
@FPST This does not return any PersistentIdentifiers unless the FetchDescriptor is
FetchDescriptor().
As I mentioned before, the sort does not work on PersistentIdentifiers. I had to fetch models using the sort and then stuff an array with the PersistentIdentifiers.
@Frameworks Engineer So, I can fetch models with the SortDescriptor, but not the identifiers with the SortDescriptor because there are pending changes in the ModelContext. I guess, my question is why didn't the model fetch fail if there are pending changes, but the identiifier fetch does. But I will do as you suggest and get back with you.