<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFPlugIn",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@T@CFPlugInRef"
  },
  "title" : "CFPlugIn"
}
-->

# CFPlugIn

```
class CFPlugIn
```

## Overview

`CFPlugIn` provides a standard architecture for application extensions. With `CFPlugIn`, you can design your application as a host framework that uses a set of executable code modules called plug-ins to provide certain well-defined areas of functionality. This approach allows third-party developers to add features to your application without requiring access to your source code. You can also bundle together plug-ins for multiple platforms and let `CFPlugIn` transparently load the appropriate plug-in at runtime. You can use `CFPlugIn` to add plug-in capability to, or write a plug-in for, your application.

## Topics

### Creating Plug-ins

[`CFPlugInCreate(_:_:)`](/documentation/CoreFoundation/CFPlugInCreate(_:_:))

Creates a CFPlugIn given its URL.

[`CFPlugInInstanceCreate(_:_:_:)`](/documentation/CoreFoundation/CFPlugInInstanceCreate(_:_:_:))

Creates a `CFPlugIn` instance of a given type using a given factory.

### Registration

[`CFPlugInRegisterFactoryFunction(_:_:)`](/documentation/CoreFoundation/CFPlugInRegisterFactoryFunction(_:_:))

Registers a factory function and its UUID with a `CFPlugIn` object.

[`CFPlugInRegisterFactoryFunctionByName(_:_:_:)`](/documentation/CoreFoundation/CFPlugInRegisterFactoryFunctionByName(_:_:_:))

Registers a factory function with a `CFPlugIn` object using the function’s name instead of its UUID.

[`CFPlugInRegisterPlugInType(_:_:)`](/documentation/CoreFoundation/CFPlugInRegisterPlugInType(_:_:))

Registers a type and its corresponding factory function with a `CFPlugIn` object.

[`CFPlugInUnregisterFactory(_:)`](/documentation/CoreFoundation/CFPlugInUnregisterFactory(_:))

Removes the given function from a plug-in’s list of registered factory functions.

[`CFPlugInUnregisterPlugInType(_:_:)`](/documentation/CoreFoundation/CFPlugInUnregisterPlugInType(_:_:))

Removes the given type from a plug-in’s list of registered types.

### CFPlugIn Miscellaneous Functions

[`CFPlugInAddInstanceForFactory(_:)`](/documentation/CoreFoundation/CFPlugInAddInstanceForFactory(_:))

Registers a new instance of a type with `CFPlugIn`.

[`CFPlugInFindFactoriesForPlugInType(_:)`](/documentation/CoreFoundation/CFPlugInFindFactoriesForPlugInType(_:))

Searches all registered plug-ins for factory functions capable of creating an instance of the given type.

[`CFPlugInFindFactoriesForPlugInTypeInPlugIn(_:_:)`](/documentation/CoreFoundation/CFPlugInFindFactoriesForPlugInTypeInPlugIn(_:_:))

Searches the given plug-in for factory functions capable of creating an instance of the given type.

[`CFPlugInGetBundle(_:)`](/documentation/CoreFoundation/CFPlugInGetBundle(_:))

Returns a plug-in’s bundle.

[`CFPlugInGetTypeID()`](/documentation/CoreFoundation/CFPlugInGetTypeID())

Returns the type identifier for the `CFPlugIn` opaque type.

[`CFPlugInIsLoadOnDemand(_:)`](/documentation/CoreFoundation/CFPlugInIsLoadOnDemand(_:))

Determines whether or not a plug-in is loaded on demand.

[`CFPlugInRemoveInstanceForFactory(_:)`](/documentation/CoreFoundation/CFPlugInRemoveInstanceForFactory(_:))

Unregisters an instance of a type with `CFPlugIn`.

[`CFPlugInSetLoadOnDemand(_:_:)`](/documentation/CoreFoundation/CFPlugInSetLoadOnDemand(_:_:))

Enables or disables load on demand for plug-ins that do dynamic registration (only when a client requests an instance of a supported type).

### Callbacks

[`CFPlugInDynamicRegisterFunction`](/documentation/CoreFoundation/CFPlugInDynamicRegisterFunction)

A callback which provides a plug-in the opportunity to dynamically register its types with a host.

[`CFPlugInFactoryFunction`](/documentation/CoreFoundation/CFPlugInFactoryFunction)

Callback function that a plug-in author must implement to create a plug-in instance.

[`CFPlugInUnloadFunction`](/documentation/CoreFoundation/CFPlugInUnloadFunction)

Callback function that is called, if present, just before a plug-in’s code is unloaded.

### Constants

[Information Property List Keys](/documentation/CoreFoundation/cfplugin-information-property-list-keys)

A plug-in’s information property list can contain these keys used for registering types, factories, and interfaces.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)