Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugins should not require removing use_frameworks! from Podfile #9694

Closed
collinjackson opened this issue May 1, 2017 · 21 comments · Fixed by #10205
Closed

Plugins should not require removing use_frameworks! from Podfile #9694

collinjackson opened this issue May 1, 2017 · 21 comments · Fixed by #10205
Labels
p: tooling Affects the flutter_plugin_tools package package flutter/packages repository. See also p: labels.

Comments

@collinjackson
Copy link
Contributor

collinjackson commented May 1, 2017

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

@mit-mit mit-mit added the p: tooling Affects the flutter_plugin_tools package label May 2, 2017
@eseidelGoogle eseidelGoogle added this to the 3: Make conferences happy milestone May 3, 2017
@collinjackson
Copy link
Contributor Author

collinjackson commented May 8, 2017

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.

@eseidelGoogle
Copy link
Contributor

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

@collinjackson
Copy link
Contributor Author

collinjackson commented May 12, 2017

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.

@jakobr-google
Copy link
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.

@collinjackson
Copy link
Contributor Author

collinjackson commented May 15, 2017

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.

@mit-mit
Copy link
Member

mit-mit commented May 23, 2017

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

@LarkAscending
Copy link

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

@LarkAscending
Copy link

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

@ch-muhammad-adil
Copy link

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.

@shinayser
Copy link

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 ?

@pujitm
Copy link

pujitm commented Feb 4, 2019

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

@peanut-flutter
Copy link

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

Please let me know if you worked it out!

@pujitm
Copy link

pujitm commented Mar 20, 2019

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

@davydany
Copy link

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

@lifenautjoe
Copy link

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

@shinayser
Copy link

shinayser commented Sep 4, 2019

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

@lifenautjoe
Copy link

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.

@eseidelGoogle
Copy link
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).

@shinayser
Copy link

shinayser commented Sep 4, 2019

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 =(

@eseidelGoogle
Copy link
Contributor

Thank you @shinayser!

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 28, 2021
@flutter-triage-bot flutter-triage-bot bot added the package flutter/packages repository. See also p: labels. label Jul 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p: tooling Affects the flutter_plugin_tools package package flutter/packages repository. See also p: labels.
Projects
None yet
Development

Successfully merging a pull request may close this issue.