| Flutter iOS Embedder |

Instance Methods | List of all members
<FlutterPluginRegistrar> Protocol Reference

`#import <FlutterPlugin.h>`

Inheritance diagram for <FlutterPluginRegistrar>:

## Instance Methods
(NSObject< FlutterBinaryMessenger > *) | - messenger
(NSObject< FlutterTextureRegistry > *) | - textures
(void) | - registerViewFactory:withId:
(void) | - registerViewFactory:withId:gestureRecognizersBlockingPolicy:
(void) | - publish:
(void) | - addMethodCallDelegate:channel:
(void) | - addApplicationDelegate:
(NSString *) | - lookupKeyForAsset:
(NSString *) | - lookupKeyForAsset:fromPackage:

## Detailed Description

Registration context for a single `FlutterPlugin`, providing a one stop shop for the plugin to access contextual information and register callbacks for various application events.

Registrars are obtained from a `FlutterPluginRegistry` which keeps track of the identity of registered plugins and provides basic support for cross-plugin coordination.

Definition at line 283 of file FlutterPlugin.h.

## Method Documentation

## ◆ addApplicationDelegate:

- (void) addApplicationDelegate: |  | ("Disallowed in plugins used in app extensions") | NS_EXTENSION_UNAVAILABLE_IOS |

Registers the plugin as a receiver of `UIApplicationDelegate` calls.

Parameters

  delegate | The receiving object, such as the plugin's main class.

## ◆ addMethodCallDelegate:channel:

- (void) addMethodCallDelegate: |  | (NSObject< FlutterPlugin > *) | delegate
channel: |  | (FlutterMethodChannel *) | channel

Registers the plugin as a receiver of incoming method calls from the Dart side on the specified `FlutterMethodChannel`.

Parameters

  delegate | The receiving object, such as the plugin's main class.
  channel | The channel

## ◆ lookupKeyForAsset:

- (NSString*) lookupKeyForAsset: |  | (NSString *) | asset |

Returns the file name for the given asset. The returned file name can be used to access the asset in the application's main bundle.

Parameters

  asset | The name of the asset. The name can be hierarchical.

Returns
  the file name to be used for lookup in the main bundle.

## ◆ lookupKeyForAsset:fromPackage:

- (NSString*) lookupKeyForAsset: |  | (NSString *) | asset
fromPackage: |  | (NSString *) | package

Returns the file name for the given asset which originates from the specified package. The returned file name can be used to access the asset in the application's main bundle.

Parameters

  asset | The name of the asset. The name can be hierarchical.
  package | The name of the package from which the asset originates.

Returns
  the file name to be used for lookup in the main bundle.

## ◆ messenger

- (NSObject<FlutterBinaryMessenger>*) messenger |  |  |

Returns a `FlutterBinaryMessenger` for creating Dart/iOS communication channels to be used by the plugin.

Returns
  The messenger.

## ◆ publish:

- (void) publish: |  | (NSObject *) | value |

Publishes a value for external use of the plugin.

Plugins may publish a single value, such as an instance of the plugin's main class, for situations where external control or interaction is needed.

The published value will be available from the `FlutterPluginRegistry`. Repeated calls overwrite any previous publication.

Parameters

  value | The value to be published.

## ◆ registerViewFactory:withId:

- (void) registerViewFactory: |  | (NSObject< FlutterPlatformViewFactory > *) | factory
withId: |  | (NSString *) | factoryId

Registers a `FlutterPlatformViewFactory` for creation of platform views.

Plugins expose `UIView` for embedding in Flutter apps by registering a view factory.

Parameters

  factory | The view factory that will be registered.
  factoryId | A unique identifier for the factory, the Dart code of the Flutter app can use this identifier to request creation of a `UIView` by the registered factory.

## ◆ registerViewFactory:withId:gestureRecognizersBlockingPolicy:

- (void) registerViewFactory: |  | (NSObject< FlutterPlatformViewFactory > *) | factory
withId: |  | (NSString *) | factoryId
gestureRecognizersBlockingPolicy: |  | (FlutterPlatformViewGestureRecognizersBlockingPolicy) | gestureRecognizersBlockingPolicy

Registers a `FlutterPlatformViewFactory` for creation of platform views.

Plugins can expose a `UIView` for embedding in Flutter apps by registering a view factory.

Parameters

  factory | The view factory that will be registered.
  factoryId | A unique identifier for the factory, the Dart code of the Flutter app can use this identifier to request creation of a `UIView` by the registered factory.
  gestureRecognizersBlockingPolicy | How UIGestureRecognizers on the platform views are blocked.

## ◆ textures

- (NSObject<FlutterTextureRegistry>*) textures |  |  |

Returns a `FlutterTextureRegistry` for registering textures provided by the plugin.

Returns
  The texture registry.

The documentation for this protocol was generated from the following file:

- shell/platform/darwin/ios/framework/Headers/FlutterPlugin.h