Error :: [!] No `Podfile' found in the project directory - cocoapods

Error Screenshot
No `Podfile' found in the project directory. error even i hit the command in ios folder
mb#Manishs-MacBook-Air ios % pod install
[!] No `Podfile' found in the project directory.
mb#Manishs-MacBook-Air bildy % sudo gem install cocoapods
Password:
Successfully installed cocoapods-1.11.3
Parsing documentation for cocoapods-1.11.3
Done installing documentation for cocoapods after 2 seconds
1 gem installed
mb#Manishs-MacBook-Air bildy % cd deskop
cd: no such file or directory: deskop
mb#Manishs-MacBook-Air bildy % cd desktop
cd: no such file or directory: desktop
mb#Manishs-MacBook-Air bildy % cd docs
cd: no such file or directory: docs
mb#Manishs-MacBook-Air bildy % cd ios
mb#Manishs-MacBook-Air ios % export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
mb#Manishs-MacBook-Air ios % pod install
[!] No `Podfile' found in the project directory.
mb#Manishs-MacBook-Air ios %
error:::
[!] No `Podfile' found in the project directory.
mb#Manishs-MacBook-Air ios %

Related

I want to use xcode cloud to make ci cd in flutter project & get error: xcode cloud The sandbox is not in sync with the Podfile.lock?

xcode cloud fails & gives this error:
**xcode** cloud The sandbox is not in sync with the *podfile.lock*.
this is my script:
#!/bin/sh
# The default execution directory of this script is the ci_scripts directory.
cd $CI_WORKSPACE # change working directory to the root of your cloned repo.
# Install Flutter using git.
git clone https://github.com/flutter/flutter.git --depth 1 -b stable $HOME/flutter
export PATH="$PATH:$HOME/flutter/bin"
# Install Flutter artifacts for iOS (--ios), or macOS (--macos) platforms.
flutter precache --ios
# Install Flutter dependencies.
flutter pub get
# Install CocoaPods using Homebrew.
HOMEBREW_NO_AUTO_UPDATE=1 # disable homebrew's automatic updates.
brew install cocoapods
export GEM_HOME="$HOME/.gem"
gem install cocoapods
# Install CocoaPods dependencies.
cd ios && rm -rf Pods && gem install cocoapods && pod install
sudo arch -x86_64 gem install ffi
arch -x86_64 pod install
exit 0

Errno::EACCES: Permission denied # rb_sysopen on http-parser 1.2.3

I've updated my macOS to Big Sur 11.3.1 and reinstall the xcode command. When I run bundle install for my Gemfile (I didn't use rail), it occurs error when install the gem http-parser 1.2.3.
Then it occurs the error:
Errno::EACCES: Permission denied # rb_sysopen - /Users/relaxlalalala/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/extensions/x86_64-darwin-18/3.0.0/http-parser-1.2.3/gem.build_complete
I've tried
sudo chown -R relaxlalalala .rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/extensions/x86_64-darwin-18/3.0.0/http-parser-1.2.3/gem.build_complete
but it said
chown: .rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/extensions/x86_64-darwin-18/3.0.0/http-parser-1.2.3/gem.build_complete: No such file or directory
How can I get the folder permission or resolve the gem.build_complete problem?
What should the permissions be?
Looking at my own rbenv installation,
I own all files under ~/.rbenv, and
directories under ~/.rbenv are drwxr-xr-x (755) and
files are either -rw-rw-r-- (664) or
-rwxrwxr-x (775), if they are meant to be executable.
Recommendation
Just reinstall everything :)
rbenv uninstall 3.0.1
rbenv install 3.0.1
bundle install

Problems installing cocoapods

I am having problems with cocoa pods (Mac Mojave 10.14) . I believe I have successfully installed it, but my pod commands are not recognised. Here is my terminal session:
Jims-MacBook-Pro:IOSChartTest KatherineBurke$ sudo gem install cocoapods
Password:
Successfully installed cocoapods-1.9.1
Parsing documentation for cocoapods-1.9.1
Done installing documentation for cocoapods after 2 seconds
1 gem installed
Jims-MacBook-Pro:IOSChartTest KatherineBurke$ pod --version
-bash: pod: command not found
Jims-MacBook-Pro:IOSChartTest KatherineBurke$
Solution
sudo gem install -n /usr/local/bin cocoapods
Why?
I'm not super familiar with the unix file structure and permissions but my understanding is:
On any given command do which git, which pod, which gem, etc when you do that the command line will tell you from where it's running git or pod or gem command.
My results:
~ $ which pod
/usr/local/bin/pod
~ $ which git
/usr/local/bin/git
~ $ which gem
/usr/bin/gem
Since macOS Catalina, Apple has changed the permissions and now most of the system files are write-protected. See here.
As a result you should have it installed into /usr/local/bin/ where local programs and scripts belong to. For more on the directories see here

Cocoapods error in 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

CocoaPods doesn't work after upgrading Mac OS X EI Capitain

I have this error when I am trying to install a pod using the Xcode plugin -- CocoaPods :
"The command path could not be resolved. Resolved command path for "pod" is invalid. Expanded GEM_PATH: /usr/bin."
After successfully reinstalling CocoaPods through Terminal and running command
$ pod install
I have this error:
-bash: pod: command not found
CocoaPods works fine before upgrading Mac OS
Open terminal and:
sudo gem uninstall cocoapods
sudo gem install -n /usr/local/bin cocoapods
sudo chmod +rx /usr/local/bin/
reinstall cocoapods with the command
sudo gem install -n /usr/local/bin cocoapods
change path to /usr/local/bin : Xcode->product->cocoapods->GEM_PATHpicture shows

Resources