Skip to content

Plugins should not require removing use_frameworks! from Podfile #9694

Closed

Description

@collinjackson

Right now the Google Sign In example app has removed use_frameworks! from its Podfile.

If this line is added back, the pod install step fails with the following error.

[!] The 'Pods-Runner' target has transitive dependencies that include static binaries: (/Users/jackson/git/gsi42/example/ios/Pods/Google/Frameworks/GGLCore.framework and /Users/jackson/git/gsi42/example/ios/Pods/Google/Frameworks/GGLSignIn.framework)

See firebase/FirebaseUI-iOS#34 for an example of other devs struggling with this issue.

A related issue is that the FlutterFire plugins are also written assuming use_frameworks! is not in the Podfile. For example, the Firebase Analytics example app fails when use_frameworks! is added back to its Podfile.

    <module-includes>:1:1: warning: umbrella header for module 'Flutter' does not include header 'FlutterAsyncMessageListener.h' [-Wincomplete-umbrella]
    #import "Headers/Flutter.h"
    ^
    <module-includes>:1:1: warning: umbrella header for module 'Flutter' does not include header 'FlutterJSONMessageListener.h' [-Wincomplete-umbrella]
    <module-includes>:1:1: warning: umbrella header for module 'Flutter' does not include header 'FlutterMessageListener.h' [-Wincomplete-umbrella]
    3 warnings generated.
    In file included from /Users/jackson/git/firebase_analytics/ios/Classes/FirebaseAnalyticsPlugin.m:7:
    /Users/jackson/git/firebase_analytics/example/ios/Pods/Headers/Private/Firebase/Firebase.h:1:9: fatal error: 'FirebaseAnalytics/FirebaseAnalytics.h' file not found
    #import <FirebaseAnalytics/FirebaseAnalytics.h>
            ^
    3 warnings and 1 error generated.

We should try to make our plugin system compatible with use_frameworks!, or if that's not possible for Google Sign In, at least make the Firebase plugins able to build with use_frameworks!.

/cc @mravn-google @jakobr-google @szakarias @mit-mit

Activity

  1. added this to the milestone on May 3, 2017
  2. collinjackson commented on May 8, 2017

    @collinjackson
    ContributorAuthor

    We have a workaround (commenting out use_frameworks!), though it's not pretty, so I’m probably going to focus on other more pressing issues for the next few weeks. This issue is available if anyone else wants to investigate; it's possible that the answer is "just move to Carthage" in which case we can punt it.

  3. eseidelGoogle commented on May 12, 2017

    @eseidelGoogle
    Contributor

    If we're going to move to Carthage we'll want to do that sooner rather than later. :)

  4. collinjackson commented on May 12, 2017

    @collinjackson
    ContributorAuthor

    Carthage isn't officially supported by Firebase or Google Sign-In SDKs yet, so I think we might be stuck with Cocoapods until that changes. It is supported by Facebook, though.

  5. jakobr-google commented on May 15, 2017

    @jakobr-google
    Contributor

    Plus, Carthage doesn't automatically add(/remove) the dependent frameworks to your app project, which is basically the only thing we're using CocoaPods for (well, that, and letting plugins transitively depend on other frameworks).

    Switching to Carthage means having to develop our own code for managing the Xcode projects, so it's not happening right now.

  6. collinjackson commented on May 15, 2017

    @collinjackson
    ContributorAuthor

    We talked about this in our meeting this morning and it sounds like we want use_frameworks! to be commented out by default in the new project template. This is more work for Swift developers but makes life easier for everyone else.

  7. mit-mit commented on May 23, 2017

    @mit-mit
    Member

    @collinjackson @LarkAscending can we go ahead and remove this from the Firebase codelab then?

  8. LarkAscending commented on May 23, 2017

    @LarkAscending

    YES we can do that! Excellent news....and it's a low-impact change to the codelab.
    Removing and republishing now.

  9. LarkAscending commented on May 23, 2017

    @LarkAscending

    Removed from step 6, Configure Google Sign-In on iOS section:
    https://codelabs.developers.google.com/codelabs/flutter-firebase/#5

  10. ch-muhammad-adil commented on Apr 12, 2018

    @ch-muhammad-adil

    In your podfile where You see

    target 'Runner' do
      use_frameworks!  
    

    comment user_frameworks!

    target 'Runner' do
      # use_frameworks!  
    

    and go to path /ios of the project

    run

    pod install

    and cheers.

  11. shinayser commented on Jan 30, 2019

    @shinayser

    I am trying to deploy my application and after removing use frameworks! from the pod file I am getting a lot of erros.
    One of them is that one:

    /Users/danieloliveira/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/video_player-0.6.5/ios/Classes/VideoPlayerPlugin.m:93:55: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
                                                         if (_isLooping) {
                                                             ^
                                                             self->
       /Users/danieloliveira/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/video_player-0.6.5/ios/Classes/VideoPlayerPlugin.m:97:57: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
                                                           if (_eventSink) {
                                                               ^
                                                               self->
       /Users/danieloliveira/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/video_player-0.6.5/ios/Classes/VideoPlayerPlugin.m:98:55: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
                                                             _eventSink(@{@"event" : @"completed"});
                                                             ^
                                                             self->
       /Users/danieloliveira/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/video_player-0.6.5/ios/Classes/VideoPlayerPlugin.m:115:15: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
                 if (_disposed) return;
                     ^
                     self->
    Could not build the precompiled application for the device.
       /Users/danieloliveira/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/video_player-0.6.5/ios/Classes/VideoPlayerPlugin.m:119:16: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
                     [_player replaceCurrentItemWithPlayerItem:item];
                      ^
                      self->
       5 warnings generated.
    

    Anyone got a clue about it ?

  12. pujitm commented on Feb 4, 2019

    @pujitm

    No, but I have the same issue; you're not alone

  13. peanut-flutter commented on Mar 20, 2019

    @peanut-flutter

    @shinayser, @pujitm, I have the same issue. See:
    aloisdeniel/flutter_plugin_appcenter#3 (comment)

    Please let me know if you worked it out!

  14. pujitm commented on Mar 20, 2019

    @pujitm

    @peanut-flutter The last time I checked, I still had to remove use_frameworks!

  15. davydany commented on Apr 16, 2019

    @davydany

    Still having this issue.

    As per the instructions, I've done the following:

    1. Added camera: ^0.4.3+2 to my pubspec.yaml,
    2. flutter packages get.
    3. I've added NSCameraUsageDescription and NSMicrophoneUsageDescription to my Info.plistwith the appropriate usage description.
    4. I've commented out use_frameworks! in my Podfile, and ran pod install and pod update at different times.

    Still, I'm left with the following error:

    ☁  tcp_flutter [master] flutter run -d 9B1AED9A-88A5-4A88-8618-10DFEA93FEBD
    Launching lib/main.dart on iPhone Xʀ in debug mode...
    Running Xcode build...
     ├─Assembling Flutter resources...                           1.4s
     └─Compiling, linking and signing...                         0.3s
    Xcode build done.                                            3.7s
    Failed to build iOS app
    Error output from Xcode build:
    ↳
        ** BUILD FAILED **
    
    
    Xcode's output:
    ↳
        === BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
        /Users/davydany/.tcp/tcp_flutter/ios/Runner/GeneratedPluginRegistrant.m:6:9: fatal error: 'camera/CameraPlugin.h' file not found
        #import <camera/CameraPlugin.h>
                ^~~~~~~~~~~~~~~~~~~~~~~
        1 error generated.
    
    Could not build the application for the simulator.
    Error launching application on iPhone Xʀ.
    
  16. lifenautjoe commented on Sep 4, 2019

    @lifenautjoe

    Same issue here. Any chance we can reopen this isuse?

  17. shinayser commented on Sep 4, 2019

    @shinayser

    This issue is definetly real. Please @eseidel, you are our only hope =(

    I simply can' run my project on MacOS since september last year (18). Everytime I need to debug ios is a real problem because my project doesn't compile though Intellij but it does through x-code! This is a problem because when compiling through x-code we lose hot reload and need to recompile every change

    I have posted it on a separated issue, here #32910

  18. lifenautjoe commented on Sep 4, 2019

    @lifenautjoe

    Oh my god, I thought I was alone in this, I also can get the project to run through XCode but not with the flutter run nor flutter build command.

    Really really regretting choosing Flutter in the past couple days where I have been dealing with users uploading videos and playing them back. That's too cutting edge for official Flutter libraries, and packages which go in that way are plagued of pitfalls as they rely on 3rd party plugins which brings us here.

    But hey, we've got GameController support right? What else could be more important than that 🤔

    Sorry if I'm coming through rude, I'm just exhausted of spending days surfing through blocking, unresolved, closed and ghost issues, struggling with something as basic and elementary as media playing.

  19. eseidelGoogle commented on Sep 4, 2019

    @eseidelGoogle
    Contributor

    This issue was closed 2 years ago. I think it would be most helpful if someone would be willing to open a fresh issue so we can make sure to address exactly the troubles being hit today.

    @collinjackson or @jmagman may have more context as to the current state of things, but I recommend we start with a fresh issue (which can link to this one if desired).

  20. shinayser commented on Sep 4, 2019

    @shinayser

    This issue was closed 2 years ago. I think it would be most helpful if someone would be willing to open a fresh issue so we can make sure to address exactly the troubles being hit today.

    @collinjackson or @jmagman may have more context as to the current state of things, but I recommend we start with a fresh issue (which can link to this one if desired).

    I had already on #32910. It is almost 4 months old with no response =(

  21. eseidelGoogle commented on Sep 4, 2019

    @eseidelGoogle
    Contributor

    Thank you @shinayser!

  22. github-actions commented on Aug 28, 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.

  23. locked as resolved and limited conversation to collaborators on Aug 28, 2021
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

    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