flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
166.98k stars 27.68k forks source link

iOS: cocoapods setup/documentation #24875

Closed neiljaywarner closed 5 years ago

neiljaywarner commented 6 years ago

I am reporting two issues when trying to do Firebase Flutter Codelab (but I don't see it as codelab bug of coursae)

  1. When i try to add to the pubspec.yaml and get the package for cloud firestore and run on iOS I get errors about
    
    Warning: CocoaPods not installed. Skipping pod install.
    CocoaPods is used to retrieve the iOS platform side's plugin code that responds to your plugin usage on the Dart side.
    Without resolving iOS dependencies with CocoaPods, plugins will not work on iOS.
    For more info, see https://flutter.io/platform-plugins
    To install:
    brew install cocoapods
    pod setup

Starting Xcode build... Xcode build done. 11.3s Failed to build iOS app Error output from Xcode build: ↳ BUILD FAILED

Xcode's output: ↳ === BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug === Debug.xcconfig line 1: Unable to find included file "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" Debug.xcconfig line 1: Unable to find included file "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" The use of Swift 3 @objc inference in Swift 4 mode is deprecated. Please address deprecated @objc inference warnings, test your code with “Use of deprecated Swift 3 @objc inference” logging enabled, and then disable inference by changing the "Swift 3 @objc Inference" build setting to "Default" for the "Runner" target. === BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug === /Users/neil/IdeaProjects/baby_base_test/ios/Runner/GeneratedPluginRegistrant.m:6:9: fatal error: 'cloud_firestore/CloudFirestorePlugin.h' file not found

import <cloud_firestore/CloudFirestorePlugin.h>

        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

Could not build the application for the simulator. Error launching application on iPhone X.


2. In addition, when i try "to install" steps with "brew install cocoapods
  pod setup" i get the below error on podsetup
unfortunately i don't know anything about cocoapods or iOS development (or really ruby to speak of past crud-hello-world-years-ago); perhaps it's an easy fix if i did.

/usr/local/bin/pod: /usr/local/Cellar/cocoapods/1.5.3/libexec/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory /usr/local/bin/pod: line 2: /usr/local/Cellar/cocoapods/1.5.3/libexec/bin/pod: Undefined error: 0

neiljaywarner commented 6 years ago

in addition it says

CocoaPods is used to retrieve the iOS platform side's plugin code that responds to your plugin usage on the Dart side.
  Without resolving iOS dependencies with CocoaPods, plugins will not work on iOS.
  For more info, see https://flutter.io/platform-plugins

and the "for more info" link does not appear to give any useful info - for example "Cocoapods" is not in it

neiljaywarner commented 6 years ago

ok so my apologies, this has nothing to do with firestore, updating title; i get the same non-useful directions from fluttter doctor

matthew-carroll commented 6 years ago

CC @dnfield @xster in case either of you know what @neiljaywarner needs to do to get Cocoapods working.

dnfield commented 6 years ago

Do you have the xcode command line tools installed? Try xcode-select --install

tvolkert commented 6 years ago

Does https://flutter.io/docs/get-started/install/macos#deploy-to-ios-devices help? If not, it'd be good to augment that page with whatever could be made better.

neiljaywarner commented 6 years ago

@tvolkert That link does not help because it is for installing to a physical device. I'm just trying to run on a iPhone simulator. @dnfield I checked that and i show

xcode-select: error: command line tools are already installed, use "Software Update" to install updates

For clarity

I apologize it's a bit long, so i'll include it in another comment since it is the "real issue" to be honest. I will probably try a bit to resolve it and then change my approach. Note: I've used cloud firestore before in the summer, both for the code lab and an actual small project

neiljaywarner commented 6 years ago

a-ha I found a very related issue (the real issue) https://github.com/flutter/flutter/issues/13980 (except I do not have High Sierra, I have Sierra)

tvolkert commented 6 years ago

Note that homebrew and cocoapods are not needed for Android development - only for iOS (both simulator and real devices), so it makes sense that you haven't needed them thus far for Android.

neiljaywarner commented 6 years ago

@tvolkert I hear you - and flutter doctor appears to indicate that I have done none of the steps for iOS toolchain (although I have done some of them from setup on flutter.io - but I can in fact run another app on an iOS simulator, both file-new project, and an app that uses

  http: ^0.12.0
  charts_flutter: ^0.5.0
  args: ^1.4.3

in pubspec.yaml

neiljaywarner commented 6 years ago

Here is the full output of the terminal from the beginning; this will give you an idea perhaps of how fresh my machine was concerning the relevant toolchain


C02TK00DH040:~ neil$ brew install cocoapods
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> New Formulae
aom             easyengine      healpix         minica          qalculate-gtk
astrometry-net  fx              i386-elf-gdb    opa             up
curl-openssl    gitmoji         kubespy         pict            websocat
==> Updated Formulae
abcm2ps                                  librsvg
abyss                                    libsass
ace                                      libspectre
adwaita-icon-theme                       libtcod
akamai                                   libtensorflow
amazon-ecs-cli                           libtiff
ammonite-repl                            libtorrent-rasterbar
amqp-cpp                                 libuv
angular-cli                              libvirt
annie                                    libvisio
ansible                                  libwebsockets
ansible-cmdb                             libxlsxwriter
ansifilter                               libxml2
apache-spark                             lighttpd
ark                                      linkerd
armor                                    llvm
arx                                      llvm@3.9
asdf                                     llvm@4
augustus                                 llvm@5
autopep8                                 llvm@6
aws-es-proxy                             lmod
aws-sdk-cpp                              logstash
awscli                                   lumo
azure-cli                                lxc
azure-storage-cpp                        macvim
babel                                    mame
ballerina                                mandoc
bat                                      mapnik
bazel                                    mariadb
beagle                                   mariadb@10.0
beast                                    mariadb@10.1
bettercap                                mariadb@10.2
bgpdump                                  maxwell
binaryen                                 mesa
binutils                                 meson
bison                                    metaproxy
bitcoin                                  micronaut
bitrise                                  mill
bitwarden-cli                            mimic
bluepill                                 minio
boost                                    minio-mc
boost-bcp                                miniserve
boost-build                              minizinc
boost-mpi                                mitie
boost-python                             mkl-dnn
boost-python3                            mkvtoolnix
botan                                    mlt
btfs                                     mmseqs2
bundletool                               mockserver
byteman                                  monero
c10t                                     mongodb
cabal-install                            mongodb@3.4
caddy                                    mongodb@3.6
cargo-completion                         mosquitto
cayley                                   mpc
cclive                                   mpd
certbot                                  mpich
certigo                                  mps-youtube
chakra                                   mysqltuner
chamber                                  nailgun
checkbashisms                            nano
chicken                                  nanomsg
chronograf                               nasm
circleci                                 ncmpcpp
clang-format                             netdata
cling                                    nghttp2
clojurescript                            nginx
cmake                                    nnn
cockroach                                node
conan                                    node-build
configen                                 node@10
confluent-oss                            node@6
console_bridge                           node@8
consul                                   nodeenv
convox                                   ocaml
couchdb                                  ocaml-num
cpanminus                                ocamlsdl
cpprestsdk                               octave
crc32c                                   openapi-generator
crosstool-ng                             opencv@2
crystal-icr                              openfortivpn
cucumber-cpp                             openimageio
curaengine                               openrct2
cython                                   openssl
dartsim                                  openssl@1.1
dash                                     opus-tools
davix                                    opusfile
dcm2niix                                 osquery
ddgr                                     osrm-backend
dependency-check                         paket
diffoscope                               pandoc
digitemp                                 parallel
direnv                                   parallelstl
dmd                                      passenger
dnscrypt-proxy                           pazpar2
docfx                                    pcl
docker                                   pdal
docker-completion                        pdftoedn
docker-compose                           percona-server
docker-compose-completion                pgcli
docker-credential-helper-ecr             pgformatter
docker-machine                           pgroonga
docker-machine-completion                phoronix-test-suite
doctl                                    php
doitlive                                 php@5.6
dscanner                                 php@7.0
duc                                      php@7.1
duo_unix                                 phpunit
dwdiff                                   picard-tools
editorconfig                             pijul
elasticsearch                            pip-completion
elektra                                  pipenv
emscripten                               pktanon
epubcheck                                planck
erlang                                   platformio
erlang@18                                poppler
erlang@20                                postgresql
eslint                                   ppsspp
ethereum                                 pqiv
exercism                                 pre-commit
exploitdb                                presto
faas-cli                                 prettier
fabio                                    primesieve
fatsort                                  prometheus
fbi-servefiles                           protobuf
fdk-aac                                  ps2eps
fdk-aac-encoder                          pspg
fio                                      pulumi
firebase-cli                             pumba
fluent-bit                               purescript
fluxctl                                  py2cairo
fmt                                      pygobject3
fn                                       python
folly                                    qt
freeciv                                  quicktype
freeling                                 rabbitmq
frugal                                   rakudo-star
fruit                                    rancher-cli
fselect                                  range-v3
fswatch                                  rbspy
gexiv2                                   rclone
gflags                                   rebar3
ghostscript                              recon-ng
gimme                                    redis
git                                      remarshal
git-annex                                restic
git-archive-all                          rke
git-lfs                                  rom-tools
git-quick-stats                          root
git-standup                              rst-lint
git-subrepo                              rtags
gitbucket                                rust
gitlab-gem                               rustup-init
gitversion                               sagittarius-scheme
gjs                                      sbcl
glslang                                  sbt@0.13
gmime                                    sceptre
gmsh                                     scrcpy
gnuradio                                 sdcc
go-bindata                               selenium-server-standalone
gobject-introspection                    serverless
goffice                                  sfcgal
golang-migrate                           shadowsocks-libev
gopass                                   shc
goreleaser                               shfmt
gr-osmosdr                               sile
gradio                                   simple-amqp-client
gradle                                   sip
grafana                                  skaffold
graph-tool                               skafos
graphicsmagick                           sleuthkit
groovy                                   smimesign
groovysdk                                snappystream
grpc                                     sonarqube
grunt-completion                         sops
gtkmm3                                   source-highlight
gupnp-av                                 sourcekitten
gwyddion                                 sphinx-doc
hapi-fhir-cli                            sqlite
harfbuzz                                 sqlmap
haskell-stack                            sratoolkit
hcloud                                   sslscan
helmfile                                 statik
hfstospell                               stern
httpd                                    stgit
httpie                                   stockfish
hugo                                     swift
hunspell                                 swiftformat
hyperfine                                swiftlint
i2pd                                     syncthing
icu4c                                    sysdig
imageoptim-cli                           tarantool
influxdb                                 tbb
innotop                                  tcpreplay
inspircd                                 tectonic
instead                                  telegraf
ios-deploy                               teleport
ios-webkit-debug-proxy                   termius
jbig2dec                                 termrec
jdnssec-tools                            terraform_landscape
jdupes                                   terragrunt
jenkins                                  tile38
jetty                                    tinyxml2
jfrog-cli-go                             tippecanoe
jhipster                                 tomcat
juju                                     topgrade
jump                                     tox
just                                     tree
kallisto                                 tty-solitaire
kibana                                   ttyd
kibana@5.6                               tunnel
kitchen-sync                             uhd
knot                                     uncrustify
kobalt                                   upscaledb
kotlin                                   urdfdom_headers
krakend                                  uru
kube-aws                                 v8
kubectx                                  vagrant-completion
kubeless                                 vala
kubernetes-cli                           vault
kubernetes-service-catalog-client        vaulted
lablgtk                                  vegeta
landscaper                               vert.x
laszip                                   vfuse
latex2html                               vim
lcm                                      vim@7.4
lean-cli                                 vsts-cli
ledger                                   vtk
lego                                     wartremover
lgogdownloader                           wcslib
libav                                    weaver
libbitcoin                               webp
libbitcoin-blockchain                    webpack
libbitcoin-client                        wesnoth
libbitcoin-database                      widelands
libbitcoin-explorer                      wireguard-tools
libbitcoin-network                       wolfssl
libbitcoin-node                          wskdeploy
libbitcoin-protocol                      wtf
libbitcoin-server                        xmake
libcdr                                   xonsh
libcec                                   xsimd
libcouchbase                             xtensor
libextractor                             yamllint
libfreehand                              yarn
libhttpserver                            yaz
libical                                  yle-dl
libimagequant                            you-get
liblcf                                   youtube-dl
libmspub                                 yq
libomp                                   z3
libphonenumber                           zebra
libpq                                    zimg
libpqxx                                  zorba
libqalculate                             zsh-autosuggestions
librealsense
==> Renamed Formulae
gutenberg -> zola          hh -> hstr                 mat -> mat2

==> Installing dependencies for cocoapods: libyaml, openssl, readline and ruby
==> Installing cocoapods dependency: libyaml
==> Downloading https://homebrew.bintray.com/bottles/libyaml-0.2.1.sierra.bottle
######################################################################## 100.0%
==> Pouring libyaml-0.2.1.sierra.bottle.tar.gz
🍺  /usr/local/Cellar/libyaml/0.2.1: 9 files, 299.6KB
==> Installing cocoapods dependency: openssl
==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2q.sierra.bottl
######################################################################## 100.0%
==> Pouring openssl-1.0.2q.sierra.bottle.tar.gz
==> Caveats
A CA file has been bootstrapped using certificates from the SystemRoots
keychain. To add additional certificates (e.g. the certificates added in
the System keychain), place .pem files in
  /usr/local/etc/openssl/certs

and run
  /usr/local/opt/openssl/bin/c_rehash

openssl is keg-only, which means it was not symlinked into /usr/local,
because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.

If you need to have openssl first in your PATH run:
  echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile

For compilers to find openssl you may need to set:
  export LDFLAGS="-L/usr/local/opt/openssl/lib"
  export CPPFLAGS="-I/usr/local/opt/openssl/include"

==> Summary
🍺  /usr/local/Cellar/openssl/1.0.2q: 1,794 files, 12.3MB
==> Installing cocoapods dependency: readline
==> Downloading https://homebrew.bintray.com/bottles/readline-7.0.5.sierra.bottl
######################################################################## 100.0%
==> Pouring readline-7.0.5.sierra.bottle.tar.gz
==> Caveats
readline is keg-only, which means it was not symlinked into /usr/local,
because macOS provides the BSD libedit library, which shadows libreadline.
In order to prevent conflicts when programs look for libreadline we are
defaulting this GNU Readline installation to keg-only.

For compilers to find readline you may need to set:
  export LDFLAGS="-L/usr/local/opt/readline/lib"
  export CPPFLAGS="-I/usr/local/opt/readline/include"

==> Summary
🍺  /usr/local/Cellar/readline/7.0.5: 46 files, 1.5MB
==> Installing cocoapods dependency: ruby
==> Downloading https://homebrew.bintray.com/bottles/ruby-2.5.3_1.sierra.bottle.
######################################################################## 100.0%
==> Pouring ruby-2.5.3_1.sierra.bottle.tar.gz
==> Caveats
By default, binaries installed by gem will be placed into:
  /usr/local/lib/ruby/gems/2.5.0/bin

You may want to add this to your PATH.

ruby is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

If you need to have ruby first in your PATH run:
  echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> ~/.bash_profile

For compilers to find ruby you may need to set:
  export LDFLAGS="-L/usr/local/opt/ruby/lib"
  export CPPFLAGS="-I/usr/local/opt/ruby/include"

==> Summary
🍺  /usr/local/Cellar/ruby/2.5.3_1: 16,228 files, 27.6MB
==> Installing cocoapods
==> Downloading https://homebrew.bintray.com/bottles/cocoapods-1.5.3.sierra.bott
######################################################################## 100.0%
==> Pouring cocoapods-1.5.3.sierra.bottle.tar.gz
🍺  /usr/local/Cellar/cocoapods/1.5.3: 9,170 files, 13.7MB
==> Caveats
==> openssl
A CA file has been bootstrapped using certificates from the SystemRoots
keychain. To add additional certificates (e.g. the certificates added in
the System keychain), place .pem files in
  /usr/local/etc/openssl/certs

and run
  /usr/local/opt/openssl/bin/c_rehash

openssl is keg-only, which means it was not symlinked into /usr/local,
because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.

If you need to have openssl first in your PATH run:
  echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile

For compilers to find openssl you may need to set:
  export LDFLAGS="-L/usr/local/opt/openssl/lib"
  export CPPFLAGS="-I/usr/local/opt/openssl/include"

==> readline
readline is keg-only, which means it was not symlinked into /usr/local,
because macOS provides the BSD libedit library, which shadows libreadline.
In order to prevent conflicts when programs look for libreadline we are
defaulting this GNU Readline installation to keg-only.

For compilers to find readline you may need to set:
  export LDFLAGS="-L/usr/local/opt/readline/lib"
  export CPPFLAGS="-I/usr/local/opt/readline/include"

==> ruby
By default, binaries installed by gem will be placed into:
  /usr/local/lib/ruby/gems/2.5.0/bin

You may want to add this to your PATH.

ruby is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

If you need to have ruby first in your PATH run:
  echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> ~/.bash_profile

For compilers to find ruby you may need to set:
  export LDFLAGS="-L/usr/local/opt/ruby/lib"
  export CPPFLAGS="-I/usr/local/opt/ruby/include"

C02TK00DH040:~ neil$ pod setup
/usr/local/bin/pod: /usr/local/Cellar/cocoapods/1.5.3/libexec/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/pod: line 2: /usr/local/Cellar/cocoapods/1.5.3/libexec/bin/pod: Undefined error: 0
neiljaywarner commented 6 years ago

1) is the basic idea that plugins that are 100% dart do not require cocoapods even for iOS? (like the ones above) and so that is why adding cloud firestore broke it 2) I see http://guides.cocoapods.org/using/troubleshooting.html says "CocoaPods is not compatible with MacRuby."

I also eventually tried, from the terminal instructions

C02TK00DH040:~ neil$   echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> ~/.bash_profile
C02TK00DH040:~ neil$   export LDFLAGS="-L/usr/local/opt/ruby/lib"
C02TK00DH040:~ neil$   export CPPFLAGS="-I/usr/local/opt/ruby/include"

and then fiddled around with my path a bit more with .bash_profile per the instructions, closed and restarted the terminal so it would take effect, experimented with different orders and i guess I'm done for now

Last login: Fri Nov 30 01:02:40 on ttys000
c02tk00dh040:~ neil$ echo $PATH
/usr/local/opt/ruby/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/lib/ruby/gems/2.5.0/bin
c02tk00dh040:~ neil$ pod setup
/usr/local/bin/pod: /usr/local/Cellar/cocoapods/1.5.3/libexec/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/pod: line 2: /usr/local/Cellar/cocoapods/1.5.3/libexec/bin/pod: Undefined error: 0
c02tk00dh040:~ neil$ 

thanks

zoechi commented 6 years ago

plugins that are 100% dart

are just called "Dart packages", only if they make native functionality available to Dart are they called "plugins"

They don't depend on cocoapods. pub (or flutter that delegates to pub) does all dependency management with such packages directly.

neiljaywarner commented 6 years ago

@zoechi OK, that makes sense. Thank you for the clarification. Hopefully I can come back to this later.

zoechi commented 5 years ago

Are you still seeing this?

neiljaywarner commented 5 years ago

I haven't checked but i think we can close it if others can use the firebase flutter code lab with iOS now thank you.

zoechi commented 5 years ago

Thanks for reporting! I'm going to close because this is not really a concrete bug but mostly a general problem with plugin dependencies and that seems to be a main point to fix this quarter anyway according to the roadmap.

rory-bell21 commented 5 years ago

I am having the exact same issue!

rory-bell21 commented 5 years ago

I tried setting up firebase with my flutter app, now when I try to run my app with the firebase plugin I get: "Warning: CocoaPods not installed. Skipping pod install. CocoaPods is used to retrieve the iOS platform side's plugin code that responds to your plugin usage on the Dart side. Without resolving iOS dependencies with CocoaPods, plugins will not work on iOS. For more info, see https://flutter.io/platform-plugins To install: brew install cocoapods pod setup Xcode build done. 5.2s Failed to build iOS app Error output from Xcode build: ↳ BUILD FAILED Xcode's output: ↳ === BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug === Debug.xcconfig line 1: Unable to find included file "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" Debug.xcconfig line 1: Unable to find included file "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" /Users/RoryBell/Development/rink_now/ios/Runner/GeneratedPluginRegistrant.m:6:9: fatal error: 'cloud_firestore/CloudFirestorePlugin.h' file not found

import <cloud_firestore/CloudFirestorePlugin.h>

        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated."

When I run my app with the imports and plugins commented out and then uncomment and hot reload and click a button that triggers a firebase command I get: "[VERBOSE-2:ui_dart_state.cc(148)] Unhandled Exception: MissingPluginException(No implementation found for method DocumentReference#setData on channel plugins.flutter.io/cloud_firestore)

0 MethodChannel.invokeMethod

package:flutter/…/services/platform_channel.dart:300

#1 DocumentReference.setData ../…/src/document_reference.dart:46 #2 ProfilePage.build. package:rink_now/pages/profile_page.dart:26 #3 _InkResponseState._handleTap package:flutter/…/material/ink_well.dart:513 #4 _InkResponseState.build. package:flutter/…/material/ink_well.dart:568 #5 GestureRecognizer.invokeCallback package:flutter/…/gestures/recognizer.dart:120 #6 TapGestureRecognizer._checkUp package:flutter/…/gestures/tap.dart:242 #7 TapGestureRecognizer.handlePrimaryPointer (package:flutter/s<…>"
5lineofcode commented 5 years ago

I tried setting up firebase with my flutter app, now when I try to run my app with the firebase plugin I get: "Warning: CocoaPods not installed. Skipping pod install. CocoaPods is used to retrieve the iOS platform side's plugin code that responds to your plugin usage on the Dart side. Without resolving iOS dependencies with CocoaPods, plugins will not work on iOS. For more info, see https://flutter.io/platform-plugins To install: brew install cocoapods pod setup Xcode build done. 5.2s Failed to build iOS app Error output from Xcode build: ↳ BUILD FAILED Xcode's output: ↳ === BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug === Debug.xcconfig line 1: Unable to find included file "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" Debug.xcconfig line 1: Unable to find included file "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" /Users/RoryBell/Development/rink_now/ios/Runner/GeneratedPluginRegistrant.m:6:9: fatal error: 'cloud_firestore/CloudFirestorePlugin.h' file not found

import <cloud_firestore/CloudFirestorePlugin.h>

^~~~~~~~~~~~ 1 error generated."

When I run my app with the imports and plugins commented out and then uncomment and hot reload and click a button that triggers a firebase command I get: "[VERBOSE-2:ui_dart_state.cc(148)] Unhandled Exception: MissingPluginException(No implementation found for method DocumentReference#setData on channel plugins.flutter.io/cloud_firestore)

0 MethodChannel.invokeMethod

package:flutter/…/services/platform_channel.dart:300

1 DocumentReference.setData

../…/src/document_reference.dart:46

2 ProfilePage.build.

package:rink_now/pages/profile_page.dart:26

3 _InkResponseState._handleTap

package:flutter/…/material/ink_well.dart:513

4 _InkResponseState.build.

package:flutter/…/material/ink_well.dart:568

5 GestureRecognizer.invokeCallback

package:flutter/…/gestures/recognizer.dart:120

6 TapGestureRecognizer._checkUp

package:flutter/…/gestures/tap.dart:242

7 TapGestureRecognizer.handlePrimaryPointer (package:flutter/s<…>"

pod install on ios directory, fix this issue for me :-)

github-actions[bot] commented 3 years ago

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.