Skip to content

Swift plugin support #10968

Closed
Closed

Description

@collinjackson

In #9694 we commented out use_frameworks! in the new project template.

I would like to bring it back so that Swift plugins will be supported.

The problem is CocoaPods/CocoaPods#3289 - plugins that have third-party dependencies (e.g. Google Sign In) don't work properly and get errors of this form:

[!] The 'Pods' target has transitive dependencies that include static binaries

use_frameworks! will happily coexist with static transitive dependencies if you override the static framework verification:

pre_install do |installer|
    # workaround for https://github.com/CocoaPods/CocoaPods/issues/3289
    def installer.verify_no_static_framework_transitive_dependencies; end
end

However, the header files don't get copied into the right place.

I think we need to understand this further and see if we can get the header to be right.

Activity

  1. added this to the 3: Current Milestone milestone on Jun 26, 2017
  2. mit-mit commented on Jul 4, 2017

    @mit-mit
    Member

    Are you working on this @collinjackson ?

  3. collinjackson commented on Jul 5, 2017

    @collinjackson
    ContributorAuthor

    I am, though it's backed up behind a couple other higher priority tasks. Happy to brain dump here if there's anyone else who wants to take it on.

  4. mclark4386 commented on Aug 8, 2017

    @mclark4386

    Really need this, so I would be happy to see a brain dump and give it my best shot^^

  5. mclark4386 commented on Aug 8, 2017

    @mclark4386

    Not to rush you @collinjackson , but I just realized I didn't tag you so I thought would tag you just to make sure. I'm sure you get a bazillion notifications from github everyday like I do^^;

  6. mclark4386 commented on Aug 8, 2017

    @mclark4386

    So I took the liberty of making a test case project: https://github.com/mclark4386/test_flutter_plugins so that when that will flutter run it should be good^^

  7. mclark4386 commented on Aug 9, 2017

    @mclark4386

    So it looks like it's not setting up the includes properly...

    /home/mclark4386/Projects/TESTS/dart/flutter/test_plugins/ios/Pods/Headers/Private/Firebase/Firebase.h:1:9: fatal error: 'FirebaseAnalytics/FirebaseAnalytics.h' file not found
        #import <FirebaseAnalytics/FirebaseAnalytics.h>
                ^
        1 error generated.
    
  8. eseidelGoogle commented on Sep 6, 2017

    @eseidelGoogle
    Contributor

    @collinjackson looks like this got dropped. Are you available for a brain dump?

  9. eseidelGoogle commented on Sep 6, 2017

    @eseidelGoogle
    Contributor

    FYI @szakarias or @mit-mit who may also have knowledge or interest here.

  10. collinjackson commented on Sep 6, 2017

    @collinjackson
    ContributorAuthor

    I pinged @szakarias about this last week to gauge availability and she said she'd get back to me. I'll follow up again. Thanks!

  11. removed their assignment
    on Sep 7, 2017
  12. 12 remaining items

  13. bramvbilsen commented on Jan 19, 2018

    @bramvbilsen

    I'm also still waiting for this :)

  14. nyvelius commented on Jan 22, 2018

    @nyvelius

    Yup, still an issue -- on iOS, Android works.

  15. szakarias commented on Feb 15, 2018

    @szakarias
    Contributor

    This should now be fixed by #14667 and flutter-team-archive/plugins#385

  16. itchyfingertips commented on Mar 26, 2018

    @itchyfingertips

    Not really. I am on beta channel and got this bug tonight. Tried to add Facebook SDK but it did not work until I commented out use_frameworks!.

  17. itchyfingertips commented on Mar 26, 2018

    @itchyfingertips

    Does not work even in master channel.

  18. szakarias commented on Mar 28, 2018

    @szakarias
    Contributor

    @itchyfingertips could you please provide more details on your project and the errors you experience?

  19. itchyfingertips commented on Mar 28, 2018

    @itchyfingertips

    You can create new project with swift on iOS side:

    1. flutter create -i swift demo

    Add this package, which contains Facebook SDK pods.
    2) flutter_facebook_login 1.1.0

    build project
    3) flutter build ios

    And you will get the error.

    If you comment out use_frameworks! error will be gone, but thats not ok.

  20. BytesZero commented on Sep 6, 2018

    @BytesZero

    +1

  21. zoechi commented on Sep 6, 2018

    @zoechi
    Contributor

    @yy1300326388 please don't post +1 comments.

  22. escamoteur commented on Nov 8, 2018

    @escamoteur
    Contributor

    How can I enable swift support for an existing project?

  23. Sh1d0w commented on Nov 8, 2018

    @Sh1d0w

    @escamoteur Open the project in Xcode, the select File -> New -> File and choose Swift File.

    Xcode then automatically will add Swift bridging header and you should be all set.

  24. github-actions commented on Sep 1, 2021

    @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.

  25. locked as resolved and limited conversation to collaborators on Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

p: toolingAffects the flutter_plugin_tools packagepackageflutter/packages repository. See also p: labels.

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions