Skip to content

The iOS platform channel code sample is outdated #12382

@navaronbracke

Description

@navaronbracke

Page URL

https://docs.flutter.dev/platform-integration/platform-channels/

Page source

https://github.com/flutter/website/tree/main/src/content/platform-integration/platform-channels.md

Describe the problem

The code sample for setting up an iOS MethodChannel for an application is slightly outdated.

Most notably it still refers to @UIApplicationMain instead of @main.

Expected fix

The code sample is updated, so that it no longer uses the deprecated annotation.
Preferably it should match what is defined in

https://github.com/flutter/flutter/blob/master/packages/flutter_tools/templates/app/ios.tmpl/Runner/AppDelegate.swift

modulo the changes for the MethodChannel itself.

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

    e1-hoursEffort: < 8 hrsfrom.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