Mac Developer Library


Quartz Composer Reference Collection QCCompositionRepository Class Reference

Deployment Target:

On This Page


The QCCompositionRepository class represents a system-wide centralized repository of built-in and installed Quartz Composer compositions (/Library/Compositions and ~/Library/Compositions). The QCCompositionRepository class cannot be subclassed.

Compositions in the repository are represented by the QCComposition class. You can use the methods of the QCCompositionRepository class to fetch all compositions or only those that meet specific criteria.

  • Returns the shared instance of the composition repository.


    + (QCCompositionRepository*) sharedCompositionRepository

    Return Value

    The shared instance of QCCompositionRepository.

  • Returns the composition that corresponds to the identifier.


    - (QCComposition*) compositionWithIdentifier:(NSString*)identifier



    A string that uniquely identifies the composition to retrieve.

    Return Value

    The composition identified by the provided string, or nil if there is no composition with that identifier in the composition repository.

  • Returns an array of compositions that match a set of criteria.


    - (NSArray*) compositionsWithProtocols:(NSArray*)protocols andAttributes:(NSDictionary*)attributes



    The protocols that you want compositions to conform to. Pass nil if you don’t want to filter based on the protocol. You can pass any of these protocols: QCCompositionProtocolAnimation, QCCompositionProtocolImageProducer, QCCompositionProtocolImageFilter, QCCompositionProtocolImageCompositor, QCCompositionProtocolImageTransition, and QCCompositionProtocolScreenSaverRSS.


    A dictionary that contains the attributes, and their associated values, that you want compositions to match. Pass nil if you don’t want to filter based on the attributes. For example, you can pass any of these attributes: QCCompositionAttributeNameKey, QCCompositionAttributeDescriptionKey, QCCompositionAttributeCopyrightKey, QCCompositionAttributeBuiltInKey, and QCCompositionAttributeTimeDependentKey.

    Return Value

    An array of QCComposition objects that meet the supplied criteria.

  • Returns an array that contains all compositions currently in the composition repository.


    - (NSArray*) allCompositions

    Return Value

    An array of QCComposition objects.