How to re install podfile.lock in a flutter application - flutter

My Xcode build was taking so long to run after I tried using firebase. I found a solution that required me to add this to my podfile
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '6.26.0'
and then delete the podfile.lock to finally run pod install. But the pod install is bringing this error since
[!] No `Podfile' found in the project directory.
I have tried installing cocoa pods again but still the pod install command did not work nether the pod init one
What can I do to solve this

First, you must navigate to the ios directory
cd ios
Then run any command related to the iOS build, in your case try
flutter clean
rm -Rf ios/Pods
rm -Rf ios/.symlinks
rm -Rf ios/Flutter/Flutter.framework
rm -Rf ios/Flutter/Flutter.podspec
pod deintegrate
pod install

Related

Semantic Issue (Xcode): Property 'timeSensitiveSetting' not found on object of type 'UNNotificationSettings *'

I am trying to implement incoming call notification.
I use FirebaseMessaging.instance.getAPNSToken() to get APNS token using Firebase but keeps returning a null value.
I've tried to:
delete the app
delete podfile.lock
flutter clean
flutter run
Reinstalling the app causes a semantic error
Please help, can't seem to find the proper solution for this issue.
Thank you
Just Update to Xcode version to 13+
or you can downgrade the package by running these commands
cd ios
flutter clean
pod deintegrate
rm -fr Pods
rm Podfile
rm -Rf Podfile.lock
rm -Rf .symlinks
rm -Rf Flutter/Flutter.framework
rm -Rf Flutter/Flutter.podspec
pod cache clean --all
same issue
https://i.stack.imgur.com/Od1or.png

mac M1 cocoapods correct architecture? flutter run won't install pods properly

I am having some issues with cocoapods and architecture i think on my mac M1. Here is what I get when I do flutter run
I think it is a problem with architecture. when i run arch in my terminal it shows i386
However when I run arch from vscode terminal this is what I get
Try to uninstall all cocoapods and gem
sudo gem uninstall cocoapods
And install again using brew
brew install cocoapods
Then clean all your pods. run this command on your terminal
flutter clean
rm -Rf ios/Pods
rm ios/Podfile.lock
rm -Rf ios/.symlinks
rm -Rf ios/Flutter/Flutter.framework
rm -Rf ios/Flutter/Flutter.podspec
You may have fixed this already, but for anyone else this just worked for me with a similar problem on my M1 Macbook Pro:
flutter clean
rm ios/Podfile.lock
flutter pub get
cd ios
arch -x86_64 pod repo update
arch -x86_64 pod install
Not sure why your terminal gives a different architecture than inside VS Code. Mine are the same.

Flutter Error running pod install After Upgrading Flutter version

After upgrading the flutter version to the latest Flutter 2.2.1, it gives an error running pod install, on running app on ios simulator
I have tried cleaning pods by performing the following commands but it did not fix the issue
flutter clean
flutter pub get
rm -Rf ios/Pods
rm -Rf ios/.symlinks
rm -Rf ios/Flutter/Flutter.framework
rm -Rf ios/Flutter/Flutter.podspec
rm ios/Podfile
and Finally
flutter run
try this:
go to ios folder and run
pod install --repo-update
run this code on the terminal
sudo arch -x86_64 gem install ffi
Next, go to the ios folder in your project, and open Podfile.
remove the # character and change the 9.0 to 10.0, and the final code should be like the below
platform :ios, '10.0'
Following set of steps worked for me:
Run flutter clean
Run flutter pub get
Run flutter pub upgrade
Delete Podfile, Podfile.lock and Pods folder within ios folder of the project
Run flutter clean
Run flutter run

Flutter Sound CocoaPods could not find compatible versions for pod "tau_sound_core":

[!] CocoaPods could not find compatible versions for pod "tau_sound_core":
In Podfile:
flutter_sound (from .symlinks/plugins/flutter_sound/ios) was resolved to 8.0.2+1, which depends on
tau_sound_core (= 8.0.2+1)
None of your spec sources contain a spec satisfying the dependency: tau_sound_core (= 8.0.2+1).
First, use the 10.0 or higher, inside Podfile for flutter_sound
platform :ios, 10.0
Then run this to clean caches inside your project directory:
cd ios
pod cache clean --all
rm Podfile.lock
rm -rf .symlinks/
cd ..
flutter clean
flutter pub get
cd ios
pod update
pod repo update
pod install --repo-update
pod update
pod install
cd ..
It's a simple fix with:
cd ./ios
pod repo update
delete Podfile.lock
delete pods
delete .symlink
pod install

"Use of undeclared identifier '__BYTE_ORDER' " error after updating pod

Getting these two errors, after updating pods:
Use of undeclared identifier '__BYTE_ORDER'
Use of undeclared identifier '__LITTLE_ENDIAN'
Using Xcode Version 11.2.1 (11B53)
Well, I have solved my problem. I have done the following steps:
1) Uninstall pod:
To remove pods from a project completely you need to install two things.
a) Cocoapods-Deintegrate Plugin
b) Cocoapods-Clean Plugin
To install those, open your terminal and type
sudo gem install cocoapods-deintegrate
(Press enter)
sudo gem install cocoapods-clean
Now go to your project directory by typing this on your terminal
cd (path of the project) //Remove the braces after cd
Then press enter and type
pod deintegrate
to deintegrate pod. Then type
pod cache clean --all
to clean the cache. Now type
pod clean
to clean pod directory.
After completing the above tasks there should be the Podfile still remaining on your project directory. Just delete that manually or use this following command on the terminal.
rm Podfile
Then delete the DerivedData from Xcode by typing
rm -rf ~/Library/Developer/Xcode/DerivedData
Or follow the link to delete it manually.
Now remove Cocoapods from the system
sudo gem uninstall cocoapods
That's it. Now you have your project free from Pods & Cleaned.
2) Install pod:
After that, install a fresh pod to your project by following:
sudo gem install -n /usr/local/bin cocoapods
For MacOS, Catalina
sudo gem install -n /usr/local/bin cocoapods -v 1.8.4
Latest CocoaPods 1.10.0 seem not working. More info is here. Then give your project path
cd /your project path
Now type
pod setup
Init the Pod
pod init
Open Pod file and add Pod list into it
For example
pod 'Firebase/Analytics'
pod 'Firebase/Auth'
pod 'Firebase/Firestore'
Then install those pods.
pod install
Now open your-project.xcworkspace. The errors should be gone.
Thanks
A clean installation of Firebase pods worked for me:
1) Comment out or temporarily remove all Firebase related pods from the Podfile
2) Update pods - this will remove all previously installed pods - run:
pod update
3) Uncomment or add back the Firebase related pods and run 'pod update' to install them.