Instance Method


Forces a sort descriptor that was securely decoded to allow evaluation.


- (void)allowEvaluation;


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.

See Also

Using Sort Descriptors

- compareObject:toObject:

Returns a comparison result value that indicates the sort order of two objects.


Returns a sort descriptor with the sort order reversed.