| Flutter iOS Embedder |

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

`#import <FlutterSceneLifeCycle.h>`

Inheritance diagram for <FlutterSceneLifeCycleEngineRegistration>:

## Instance Methods
(BOOL) | - registerSceneLifeCycleWithFlutterEngine:
(BOOL) | - unregisterSceneLifeCycleWithFlutterEngine:

## Detailed Description

A protocol for manually registering a `FlutterEngine` to receive scene life cycle events.

Definition at line 104 of file FlutterSceneLifeCycle.h.

## Method Documentation

## ◆ registerSceneLifeCycleWithFlutterEngine:

- (BOOL) registerSceneLifeCycleWithFlutterEngine: |  | (FlutterEngine *) | engine |

Registers a `FlutterEngine` to receive scene life cycle events.

This method is only necessary when the following conditions are true:

1. Multiple Scenes (UIApplicationSupportsMultipleScenes) is enabled.
2. The `UIWindowSceneDelegate` `window.rootViewController` is not a `FlutterViewController` initialized with the target `FlutterEngine`.

When multiple scenes is enabled (UIApplicationSupportsMultipleScenes), Flutter cannot automatically associate a `FlutterEngine` with a scene during the scene connection phase. In order for plugins to receive launch connection information, the `FlutterEngine` must be manually registered with either the `FlutterSceneDelegate` or `FlutterPluginSceneLifeCycleDelegate` during `scene:willConnectToSession:options:`.

In all other cases, or once the `FlutterViewController.view` associated with the `FlutterEngine` is added to the view hierarchy, Flutter will automatically handle registration for scene events.

Manually registered engines must also be manually deregistered and re-registered if they switch scenes. Use `unregisterSceneLifeCycleWithFlutterEngine:`.

Parameters

  engine | The `FlutterEngine` to register for scene life cycle events.

Returns
  `NO` if already manually registered.

## ◆ unregisterSceneLifeCycleWithFlutterEngine:

- (BOOL) unregisterSceneLifeCycleWithFlutterEngine: |  | (FlutterEngine *) | engine |

Use this method to unregister a `FlutterEngine` from the scene's life cycle events.

Parameters

  engine | The `FlutterEngine` to unregister for scene life cycle events.

Returns
  `NO` if the engine was not found among the manually registered engines and could not be unregistered.

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

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