Cocoapods error in Xcode - xcode

I am unable to run my Xcode project because of such cocoa pods errors:
diff: /../Podfile.lock: No such file or directory
diff: /Manifest.lock: No such file or directory
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
Inside my Podfile :
source 'https://github.com/CocoaPods/specs.git'
workspace 'LongPathToMyProject/..../.../MyProject.xcworkspace'
I tried 'pod install' a lot of times, also i tried
rm -rf MyProject.xcworkspace
pod install
But it is not helping me.

Your file .xcodeproj and your podfile must be in the same folder. You don't have to manually create your .workspace. Then, in the same folder run:
pod install
If it doesn't work, then install pod deintegrate:
gem install cocoapods-deintegrate
and try to deintegrate existing pods:
pod deintegrate
before running pod install again

Related

How do i resolve this pod install error on flutter?

I can't load all the requested pods apparently there is a problem with these two project dependencies ... "pod upgrade" terminal command results are:
Updating local specs repositories
Analyzing dependencies
firebase_auth: Using Firebase SDK version '10.3.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '10.3.0' defined in 'firebase_core'
firebase_database: Using Firebase SDK version '10.3.0' defined in 'firebase_core'
[!] CocoaPods could not find compatible versions for pod "Firebase/Database":
In Podfile:
firebase_database (from `.symlinks/plugins/firebase_database/ios`) was resolved to 10.0.7, which depends on
Firebase/Database (= 10.3.0)
flutter_geofire (from `.symlinks/plugins/flutter_geofire/ios`) was resolved to 0.0.1, which depends on
GeoFire (~> 4.0) was resolved to 4.1.0, which depends on
Firebase/Database (~> 6.0)
Inside /ios directory, remove the Podfile.lock file.
Then, on terminal, run to this directory:
cd ./ios
Then run the following command:
pod deintegrate && pod repo update && pod install
The command is composed of three parts:
"pod deintegrate" - This command will deintegrate CocoaPods from the project, removing any references to Pods and the Podfile.lock file
"pod repo update" - This command updates the local copy of the CocoaPods spec repo, which is the source of information about available pods.
"pod install" - This command installs the pods specified in the Podfile, and creates an Xcode workspace if one does not already exist.
This command is useful when you want to update your project's dependencies and integrate the new version of the Pod without having any conflicts.
Delete the pod file inside the ios folder.
go to the terminal in path ios ios folder and run command "pod init"
manage signin procedure in xcode
noy try to run

Can't import Flutter module with Swift AppDelegate in Xcode

I try to step by step recommend in stackoverflow for me
go into the ios folder
delete the Podfile.lock file
rm -rf Pods
pod cache clean --all
pod deintegrate
pod setup
pod install
but don't working for me
Problem screen 1
Problem screen 2

Invalid Podfile file: undefined method `enable_user_defined_build_types!'

I have installing gem on a Macbook Pro running Big Sur and M1 chip. I have followed the instructions given, added these two lines on top of my Podfile
plugin 'cocoapods-user-defined-build-types'
enable_user_defined_build_types!
then I am running the command
sudo gem install 'cocoapods-user-defined-build-types'
and gem is getting installed see below -
Successfully installed cocoapods-user-defined-build-types-0.0.7
Parsing documentation for cocoapods-user-defined-build-types-0.0.7
Done installing documentation for cocoapods-user-defined-build-types after 0 seconds
1 gem installed
Now, as soon as I run pod install, I get this error -
[!] Invalid Podfile file: undefined method `enable_user_defined_build_types!' for #<Pod::Podfile:0x0000000145251098 #defined_in_file=#<Pathname
Any idea what excatly is the problem here?
I solved this issue by installing specific version of cocoapods with gem.
Open a terminal in your Xcode project folder and run the commands below:
gem cleanup
brew uninstall cocoapods
sudo gem uninstall cocoapods
sudo gem install cocoapods -v 1.10.0 -n /usr/local/bin
sudo gem install cocoapods-user-defined-build-types
pod install --repo-update
NOTE! If you using react-native before pod install --repo-update delete your node_modules folder and install again using npm
I was struggling to get a solution,
I was trying to install the snapkit and Firebase through cocoapods, I got pod init, but after insert inside the podfile the e.g. Snpakit when I tried the comand pod install i got this issue
[!] Invalid Podfile file: undefined method......
What solved for me
I installed the brew through terminal and by brew I reinstalled cocoapods
another thing that was crucial...
when I typed insert my pod
pod 'SnapKit', '~> 5.6.0'
The Podfile, automatically change de first character to uppercase
Pod 'SnapKit', '~> 5.6.0'
After you type your pod, try to leave the word pod in lowercase, after save and close, go to terminal and try again pod install
add gem 'cocoapods-user-defined-build-types' to your gemfile and run bundle install
this should work if the other solutions didn't

Unknown pod name

In AppCode, via CocoaPods, I am trying to install the pod QuickDialog
In the Podfile, I have:
pod "QuickDialog"
When I go to install, I get an error saying Unknown pod name
The Message window shows:
/usr/bin/ruby /Applications/AppCode.app/Contents/bin/pod install --no-ansi
Updating local specs repositories
Failed with exit code: -1
What do I need to do?
Edit: Also tried suggestion by I'L'I:
pod 'QuickDialog', '~1.0'
Try on a new project:
Xcode > New > Project > Single View App > Obj-C > SO-32098667 > Next > Create
Terminal > cd ../SO-32098667/
pod init
Use the Podfile below
pod install
Podfile
platform :ios, '8.0'
target 'SO-32098667' do
pod 'QuickDialog'
end
pod install
Downloading dependencies
Installing QuickDialog (1.0)
Generating Pods project
Integrating client project
Tested minutes ago with pod version 0.37.1 Xcode version 6.4.

pod update - no such file

I get this error when doing a pod update.
pod update
[in /Users/snowcrash/myproject]
Update all pods
Analyzing dependencies
/Users/snowcrash/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/pathname.rb:425:in `open': No such file or directory # dir_initialize - /Users/snowcrash/.cocoapods/repos (Errno::ENOENT)
from /Users/snowcrash/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/pathname.rb:425:in `foreach'
Any idea why?
This was fixed as follows:
rm -rf ~/.cocoapods
pod setup
See also this:
Error on pod install

Resources