allowEvaluation()
Forces a securely decoded sort descriptor to allow evaluation.
Declaration
func allowEvaluation()Discussion
When securely decoding NSSortDescriptor objects that are encoded using NSSecureCoding, evaluation is disabled because it is potentially unsafe to evaluate descriptors you get out of an archive.
Before you enable evaluation, you should validate key paths, selectors, and related properties to ensure no erroneous or malicious code will be executed. Once you’ve preflighted the sort descriptor, you can enable the sort descriptor for evaluation by calling allowEvaluation().