Skip to content

Remove FlutterBinaryMessenger implementation from FlutterViewController #35945

Open
@gaaclarke

Description

@gaaclarke

It's left in there for now to help with the migration away from FlutterViewController publicly being a FlutterBinaryMessenger. Unfortunately if you don't have Werror turned on the change just shows up as a warning. We should have a grace period before we remove it.

Activity

lhp3851

lhp3851 commented on Aug 27, 2019

@lhp3851

Since the FlutterBinaryMessenger has been remove from FlutterViewController, I got the compiler error in my Swift Project:

Argument type 'FlutterViewController' does not conform to expected type 'FlutterBinaryMessenger'

What should I pass to the second param for initial the FlutterMethodChannel instance in swift project?

lhp3851

lhp3851 commented on Aug 27, 2019

@lhp3851

got the resolve from #35773

Old Code:

[FlutterMethodChannel 
methodChannelWithName:@"foo" 
binaryMessenger:flutterViewController]

New Code:

[FlutterMethodChannel 
methodChannelWithName:@"foo"
binaryMessenger:flutterViewController.binaryMessenger]
antoninobajeli

antoninobajeli commented on Sep 1, 2019

@antoninobajeli

Great @lhp3851 , your solution worked to me, but flutterViewController.binaryMessenger looks to be deprecated. :(

lhp3851

lhp3851 commented on Sep 8, 2019

@lhp3851

I'm not know very well. According the annotation of this property:

"This is just a convenient way to get the |FlutterEngine|'s binary messenger."

It seems to be the property binaryMessenger should belongs to FlutterEngine class, and I lookup the Docs, The FlutterEngine did maintain this property .

added
c: contributor-productivityTeam-specific productivity, code health, technical debt.
engineflutter/engine repository. See also e: labels.
on Sep 29, 2019
added a commit that references this issue on Nov 1, 2019
pedromassangocode

pedromassangocode commented on Oct 1, 2020

@pedromassangocode
added
P2Important issues not at the top of the work list
on Dec 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: contributor-productivityTeam-specific productivity, code health, technical debt.engineflutter/engine repository. See also e: labels.team-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Hixie@kf6gpe@lhp3851@antoninobajeli@BondarenkoStas

        Issue actions

          Remove FlutterBinaryMessenger implementation from FlutterViewController · Issue #35945 · flutter/flutter