[Podfile][1]```
Error output from CocoaPods:
↳
[!] The FlutterFire plugin cloud_firestore for macOS requires a macOS
deployment target of 10.12 or later.
Exception: Error running pod install
Hi, I've been stuck on this problem for a while, I'm trying to connect my flutter app with firebase but as soon as I put firestore on I have this problem. I modified the podfile file by putting the right version but nothing is done. I followed a lot of tutorials but none solved my problem. so please i need help.
I created my database on firebase, I configured it with xcode
Cocaopods version : 1.11.3
firebase_core: ^2.1.1
cloud_firestore: ^4.0.3
platform :ios, '12.0'
Podfile :
[1]: https://i.stack.imgur.com/fYqSZ.png
I solved this problem.
Here are the tips:
Run Xcode --> Click Runner --> Change version in 'minimum deployments' f.e. to 11.0 or later
Go to Visual Studio Code --> go to 'macos' folder --> click 'podfile' --> change on the same version like in Xcode in platform :osx, '11.0'
Restart App and start with debugging again.
Let me know if it worked :)
Take a look at the first line of your Podfile in your macOS folder. If it looks like this:
platform :osx, '10.11'
then change it to your desired MACOS_DEPLOYMENT_TARGET
Related
I am receiving the following error when I compile my FLutter project after adding package:
purchases_flutter: ^4.0.1 to it ....
[!] CocoaPods could not find compatible versions for pod "purchases_flutter":
In Podfile:
purchases_flutter (from .symlinks/plugins/purchases_flutter/ios)
Specs satisfying the purchases_flutter (from .symlinks/plugins/purchases_flutter/ios)
dependency were found, but they required a higher minimum deployment target.
I have checked the Readme in PubDev for this package which says:
minimum targets iOS 9.0+ is required.
However when I look in my PoDFile I have platform :ios, '10.0'. And in Xcode:
Am I missing something here. I haven't seen any other Deployment targets in Xcode or Podfile.
Would really appreciate it, if someone could point me in the correct direction with this.
Many thanks.
I have also tried creating a new Flutter project to test this from the start again and used the terminal commands as suggested below.
I still get the same error... here is a full screen shot of my Android Studio window. Showing the error, my IOS drive and Podfile.
You need to prioritize your dependencies. If the problem is only with this package or plugin, just add it with flutter pub add [dependency name], avoiding directly writing pubspec.yaml It prevents conflict between package versions, automatically finding appropriate version. Then in Podfile top define minimum version. Delete pubspec.lock file, ios/Podfile.lock file and ios/Pods directory. Execute flutter pub get. Enter ios directory via Terminal, execute pod install and try to run application again. If your Mac has apple silicon chip pod install command will be a bit different. Let me know, it worked or not.
I'm trying to build my flutter app with codemagic for ios but it fails building with this error:
[!] Automatically assigning platform iOS with version 9.0 on target Runner because no platform was specified. Please specify a platform for this target in your Podfile. See https://guides.cocoapods.org/syntax/podfile.html#platform.
Error running pod install
Build failed :| Failed to build for iOS
exactly like on this thread:
Error while building flutter app for ios on codemagic - Automatically assigning platform `iOS` with version `8.0` on target `Runner`
but couldn't understand the solution.
I'm using windows so have no pod file as well.
I also looked inside the suggested link but it links to the cocoapod website which I don't have on windows.
Any suggestions would help!
I am trying to run my code on AndroidStudio by using Flutter but when I run it shows an error:
Warning: CocoaPods not installed. Skipping pod install. CocoaPods is
used to retrieve the iOS and macOS platform side's plugin code that
responds to your plugin usage on the Dart side. Without CocoaPods,
plugins will not work on iOS or macOS. For more info, see
https://flutter.dev/platform-plugins To install see
https://guides.cocoapods.org/using/getting-started.html#installation
for instructions.
CocoaPods not installed or not in valid state. Error launching
application on iPhone 11.
flutter doctor shows that all is fine, I looked around a lot and tried lots of things like uninstall it and install it again, and tried adding:
dev_dependencies:
build_runner: ^1.10.0
dependency_overrides:
analyzer: 0.39.14
and tried
flutter channel stable
flutter upgrade
and tried
flutter channel master
flutter upgrade
But nothing worked, note that when I write "which pod" it shows the path, that means it exists right? then what is the problem? please help :(
have you tried to run pod install from the ios folder?
The only thing that worked with me is using android emulator, ios simulator still show the same error
I had the same issue and I found a solution, but with still an answered question. See my question (and one partial solution) here
The partial solution is: in Android Studio, click on the tab "Terminal" at the bottom of the IDE and in this pane, type flutter run. It does the same as the button Run, and Android Studio stopped complaining about CocaPods.
To stop the app, type q in the same terminal.
I am trying to install webview_flutter plugin but somehow my build is failing every time
Launching lib/main.dart on iPhone 11 Pro in debug mode...
Running Xcode build...
├─Assembling Flutter resources... 10.2s
└─Compiling, linking and signing... 2.1s
Xcode build done.
17.5s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
<path_to_project>ios/Runner/GeneratedPluginRegistrant.m:10:9: fatal
error: module 'webview_flutter' not found
#import webview_flutter;
~~~~~~~^~~~~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone 11 Pro.
pubspec.yml
dependencies:
flutter:
sdk: flutter
webview_flutter: ^0.3.19+8
I tried running but it did not solve it.
flutter clean
flutter pub cache repair
Have you follow all the installation for iOS for this plugin?
This is from the webview_flutter page itself:
To use this plugin on iOS you need to opt-in for the embedded views
preview by adding a boolean property to the app's Info.plist file,
with the key io.flutter.embedded_views_preview and the value YES.
This also seems to be related, take a look: https://github.com/flutter/flutter/issues/50190
In my case, the issue was that I had manually edited the podfile to add in my own (non-flutter) pod to the project. However, the flutter build would make no attempt to edit (or overwrite) the podfile, (maybe this is good) so the podfile would not have the changes necessary to support webview_flutter. I figured this all out by creating a brand new flutter project and comparing the new project's generated podfile against my current version. They looked significantly different.
flutter upgrade solved problem for me
need to produce an archive so we can upload to TestFlight so followed instructions in https://flutter.dev/docs/deployment/ios . my flutter runs on both real iPhone and simulator with no problem. so I produce a release version as required then open the resultant Xcode project (runner). immediately see the error
:-1: Multiple commands produce '/Users/jmcfet/Library/Developer/Xcode/DerivedData/Runner-cwxykfeiijpirmgbtrkzktdrahbt/ArchiveIntermediates/Runner/InstallationBuildProductsLocation/Applications/Runner.app/Frameworks/Flutter.framework':
1) Target 'Runner' has copy command from '/Users/jmcfet/AndroidStudioProjects/sis/ios/Flutter/Flutter.framework' to '/Users/jmcfet/Library/Developer/Xcode/DerivedData/Runner-cwxykfeiijpirmgbtrkzktdrahbt/ArchiveIntermediates/Runner/InstallationBuildProductsLocation/Applications/Runner.app/Frameworks/Flutter.framework'
2) That command depends on command in Target 'Runner': script phase “[CP] Embed Pods Frameworks”
now this does not happen when I do the same against the "Flutter Hello world" app so wondering what is messed up in my Flutter app
no luck :
johns-MacBook-Air:ios jmcfet$ pod install
Analyzing dependencies
Fetching podspec for Flutter from .symlinks/flutter/ios
Fetching podspec for video_player from .symlinks/plugins/video_player/ios
Downloading dependencies
Using Flutter (1.0.0)
Using video_player (0.0.1)
Generating Pods project
Integrating client project
Pod installation complete! There are 2 dependencies from the Podfile and 2 total pods installed.
[!] Automatically assigning platform ios with version 8.0 on target Runner because no platform was specified. Please specify a platform for this target in your Podfile. See https://guides.cocoapods.org/syntax/podfile.html#platform.
[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target Runner to Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig or include the Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig in your build configuration (Flutter/Release.xcconfig).
not an IOS expert but looks like the install was not successful. little confused as the Xcode project was generated by Flutter so why is Flutter generating a bad config file. if so looks like a bug to me