Skip to content

Deprecate iOS Objective-C create template flutter create --ios-language objc -t plugin for new plugins #169683

Closed

Description

@jmagman

Very similar to #148586 for newly created plugins (not apps or plugin example apps).

We have metrics that show in 2024 Q1 less than 8% of flutter create -t plugin plugins were Objective-C. Deprecate and remove the flag and templates once that number reaches < 3% (making that number up..)

Users will still be able to add Objective-C code to their plugin or replace the Swift code that's there with Objective-C.

Activity

  1. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    P2Important issues not at the top of the work list
    fyi-ecosystemFor the attention of Ecosystem team
    team-iosOwned by iOS platform team
    triaged-iosTriaged by iOS platform team
    on May 29, 2025
  2. stuartmorgan-g commented on May 29, 2025

    @stuartmorgan-g
    Contributor

    Deprecate and remove the flag and templates once that number reaches < 3% (making that number up..)

    I'd also be comfortable with planning to remove it at the end of 2025 unless a compelling use case has been presented by then (i.e., one that can't be handled by the plugin developer making a mixed-mode plugin by adding Obj-C).

  3. jmagman commented on May 29, 2025

    @jmagman
    MemberAuthor

    I just checked the usage again, for the last 90 days 4.1% of newly created plugins used Objective-C.

    go/flutter-usage-create-ios-language (internal link)

  4. stuartmorgan-g commented on May 30, 2025

    @stuartmorgan-g
    Contributor

    That's faster drop-off than I expected for the long-tail usage. In that case, maybe we plan to remove it after the branch point for the next stable?

  5. jmagman commented on Aug 13, 2025

    @jmagman
    MemberAuthor

    Down to 3.1% of newly created plugins used Objective-C. Branch is cut, let's do it.

  6. jmagman commented on Aug 13, 2025

    @jmagman
    MemberAuthor

    Update help text to say something like

              '(deprecated) This command will be removed in a future version of Flutter.',
    

    '(deprecated) The language to use for iOS-specific code, either Swift (recommended) or Objective-C (legacy). '
    'Only supported for "--template=plugin".',

    Delete

    if (template != 'plugin' && isDarwin) {
    // ios-language option is only supported for plugins. Remove the -i flag and the next parameter, "swift" or
    // "objc". This isn't proper arg parsing (for example doesn't handle -i=objc, but good enough for these tests
    // since they blow up if -i is passed incorrectly.
    final int indexOfIOSLanguage = options.indexOf('-i');
    if (indexOfIOSLanguage != -1) {
    options.removeRange(indexOfIOSLanguage, indexOfIOSLanguage + 2);
    }
    }

    Delete usage data

    Delete

    Strip out Objective-C logic from this test:

    section('Create Objective-C plugin');

  7. added a commit that references this issue on Sep 15, 2025
    1eab8e1
  8. added a commit that references this issue on Sep 17, 2025
    807c13b
  9. added a commit that references this issue on Sep 18, 2025
    a4af12f
  10. added a commit that references this issue on Sep 24, 2025
    4ebee2d
  11. github-actions commented on Sep 29, 2025

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  12. locked as resolved and limited conversation to collaborators on Sep 29, 2025
  13. added a commit that references this issue on Nov 21, 2025
    02d61cc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listteam-iosOwned by iOS platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-iosTriaged by iOS platform team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions