Type Alias


A block that overrides the default behavior of a custom transform.


typealias SecTransformActionBlock = () -> Unmanaged<CFTypeRef>?

Return Value

A dictionary of the custom items to be exported if this block is used to override the kSecTransformActionExternalizeExtraData action or NULL for any other action. Alternatively, the block returns a CFError object if an error occurs.


A block of this type is used to override the default behavior of a custom transform. This block is associated with the SecTransformOverrideTransformAction block.

The behaviors that can be overridden are:

For example:

SecTransformImplementationRef ref;
CFErrorRef error = NULL;
error = SecTransformSetTransformAction(ref, kSecTransformActionStartingExecution, ^{
    // Initialize any data needed before running
    CFErrorRef result = DoMyInitialization();
    return result;});
SecTransformTransformActionBlock actionBlock =
    // Clean up any existing data before running
    CFErrorRef result = DoMyFinalization();
    return result;};
error = SecTransformSetTransformAction(ref, kSecTransformActionFinalize,actionBlock);

See Also


typealias SecTransformAttributeActionBlock

A block used to override the default attribute handling for when an attribute is set.

typealias SecTransformDataBlock

A block used to override the default data handling for a transform.


Use actions to trigger particular behaviors.