NSMetadataQuery fail in iOS17.2

NSMetadataQuery fail in iOS17.2 with Error Domain=com.apple.accounts Code=7 ACErrorPermissionDenied

solved: in iOS17.2 adding observer forKeyPath "metadataQuery.results" will cause that NSMetadataQuery keeps Gathering and never notifies NSMetadataQueryDidFinishGatheringNotification

NSMetadataQuery fail in iOS17.2
 
 
Q