Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cocoapods: "No Xcode project found, please specify one!"

Cocoapods is giving me this error message when calling pod init:

[!] No Xcode project found, please specify one

I've...

  1. called sudo gem install cocoapods and waited for it to install
  2. dragged in my project directory folder "Hello" (see images)
  3. called pod init

Here's my desktop:

What my directory folder "Hello looks like (sudo gem install cocoapods has already finished

What happens when I try to initialize the pod.

Why does that happen?

like image 550
Carl Henretti Avatar asked Jun 03 '17 07:06

Carl Henretti


3 Answers

if you are using REACT NATIVE or FLUTTER ,make sure go to ios folder ,then pod init

cd ios
pod init
like image 187
Govan Avatar answered Nov 17 '22 17:11

Govan


Just close the XCode and terminal once then restart the Terminal. Make sure you select the path to your project folder only.

After calling cd /Users/YOUR_USER_NAME/Desktop/PROJECT_NAME just call a command ~ls and check if the list of the file contains your PROJECT_NAME.xcodeproj. If this file is available, it means you can now set up pod init. Otherwise, you should navigate to the next level and find your PROJECT_NAME.xcodeproj.

Hope it helps! :)

like image 12
Nirav Jain Avatar answered Nov 17 '22 16:11

Nirav Jain


Make sure that you are in the correct directory where you .xcodeproj is located.

like image 3
Mo Iisa Avatar answered Nov 17 '22 16:11

Mo Iisa