Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issues with adding a pod file to my Xcode project

Tags:

cocoapods

I've been trying to create a pod file for my project in my directory using the terminal, but I'm running into the issue shown below, any suggestions?

I tried restarting my Mac and even tried to add one to a different project but to no avail. Also couldn't seem to find any other instances of this occurring.

Here's the terminal output:

Matts-Mac-mini:~ sarabytestudios$ cd /Users/sarabytestudios/Desktop/Blurr\Messenger/Blurr\ Messenger.xcodeproj 
Matts-Mac-mini:Blurr Messenger.xcodeproj sarabytestudios$ pod init
[!] No xcode project found, please specify one
Matts-Mac-mini:Blurr Messenger.xcodeproj sarabytestudios$ 
like image 828
Matt Sarabyte Avatar asked Jan 17 '15 19:01

Matt Sarabyte


2 Answers

You have to create your PodFile in the same directory as your Blurr Messenger.xcodeproj.

In your case should be in /Users/sarabytestudios/Desktop/Blurr\Messenger/.

In that directory, create a file called PodFile where you must declare the cocoapods you want to include in your project (you can do it by hand or call pod init). The you must type pod install.

After that, you must open the new generated file called Blurr Messenger.xcworkspace.

like image 191
jherran Avatar answered Oct 12 '22 19:10

jherran


1) Run 'pod init' command inside the project directory(directory containing YourProject.xcodeproj file)(This will create a Podfile, a YourProject.xcworkspace file, Podfile.lock file and a Pods folder)

2) Run 'pod install' command inside the same directory.

3)Open your project using YourProject.xcworkspace file and NOT the YourProject.xcodeproj file(otherwise build fails).

like image 24
Akhil Kateja Avatar answered Oct 12 '22 19:10

Akhil Kateja