Created a new flutter project from Android Studio using the wizard.
Newly created project folder does not have any of the Pods folders or podfile in the ios directory.
This Flutter.io page states (emphasis mine):
While there is a Podfile in the iOS folder in your Flutter project, only use this if you are adding native dependencies needed for per-platform integration.
There is no podfile at all in my ios directory.
I found this comment in a different question here suggesting running the project on the ios simulator would generate the file but running the project on the sim and device both do not result in any podfile creation for me.
Is there some step in the ios side of the new flutter project creation that I missed? There's no way for me to add ios-specific dependencies without the podfile.
Output of flutter doctor
:
[✓] Flutter (Channel beta, v0.5.1, on Mac OS X 10.12.6 16G1408, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 9.2)
[✓] Android Studio (version 3.1)
[!] VS Code (version 1.25.1)
[✓] Connected devices (1 available)
The Podfile is located in the root of the Pods project. An easy way to open it is via "Open Quickly" (Shift Cmd O) typing Podfile.
Run open Podfile. Which opens the Podfile in textEdit. Add pod'CorePlot', '~> 1.4' to it and save. Run pod install -- NOTE* that is **pod update if already installed.
When we started the project, there were no packages added to flutter so the pod file wasn't automatically created. It appears that when we created our own pod file to support iOS packages without adding the flutter packages first, the default flutter pod initialization was missed. Flutter does not add it into the pod file if one already exists.
Newly created project folder does not have any of the Pods folders or podfile in the ios directory. While there is a Podfile in the iOS folder in your Flutter project , only use this if you are adding native dependencies needed for per-platform integration. There is no podfile at all in my ios directory.
The Podfile isn't supposed to be deleted out from under you. /// on themselves. @rashedmyt At the moment the presence of the Podfile indicates that pod install needs to be run during flutter run because, as this issue shows, people may have their own Podfile that doesn't use Flutter plugins so the tool doesn't know about it.
It appears that when we created our own pod file to support iOS packages without adding the flutter packages first, the default flutter pod initialization was missed. Flutter does not add it into the pod file if one already exists. After manually adding in this configuration change and linking, url_launcher works.
Here is what I usually do:
ios
folderPodfile.lock
filerm -rf Pods
pod cache clean --all
pod deintegrate
pod setup
pod install
You may also want to do
pod repo update
Once you run flutter build ios
a Podfile
and Podfile.lock
will be created for you in the ios
directory.
Follow the steps in the deploy steps official documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With