Skip to content

There is a mistake in the code preview of Migrate AppDelegate #12829

@burekas7

Description

@burekas7

Page URL

https://docs.flutter.dev/release/breaking-changes/uiscenedelegate

Page source

https://github.com/flutter/website/blob/main/src/content/release/breaking-changes/uiscenedelegate.md

Describe the problem

According to the code preview here:
https://docs.flutter.dev/release/breaking-changes/uiscenedelegate#migrate-appdelegate

The didInitializeImplicitFlutterEngine addition should be inside @objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate { block, and not ouside.

Expected fix

@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate {
  override func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  ) -> Bool {
    return super.application(application, didFinishLaunchingWithOptions: launchOptions)
  }

  func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
    GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
  }
}

Additional context

No response

I would like to fix this problem.

  • I will try and fix this problem on docs.flutter.dev.

Metadata

Metadata

Assignees

No one assigned

    Labels

    from.page-issueReported in a reader-filed concernp2-mediumNecessary but not urgent concern. Resolve when possible.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions