SecTaskValidateForRequirement(task:requirement:)
Tests whether a task’s executable satisfies a lightweight code requirement.
Declaration
func SecTaskValidateForRequirement(task: SecTask, requirement: ProcessCodeRequirement) throws -> BoolParameters
- task:
An object that represents the running task.
- requirement:
The lightweight code requirement to test.
Return Value
If the requirement matches the process, then true; false if it doesn’t.
Discussion
This function throws a value from ConstraintError if it can’t evaluate whether the executable satisfies the lightweight code requirement.