Contents

grantCapability:error:invalidationHandler:

Grants the specified capability to the process and observes an invalidation closure.

Declaration

- (id<BEProcessCapabilityGrant>) grantCapability:(BEProcessCapability *) capability error:(NSError **) error invalidationHandler:(void (^)()) invalidationHandler;

Parameters

  • capability:

    The capability to grant.

  • invalidationHandler:

    A closure that the system calls when the capability becomes invalid.

Return Value

A ProcessCapability.Grant object that represents the granted capability.

Discussion

When the process no longer needs the capability, call invalidate() on the returned object.

See Also

Coordinating processes