hi Iam new to iOS and i am trying to use CVCalender for custom calendar https://github.com/CVCalendar/CVCalendar#-cocoapods-
and i am try to install the cocoa pods but its getting error,
But i have muly cocopods in my file is these are use full or i need to delete these things as shown in image
can any one help me to how to install coacoa pods sucessfully and install cvcalender
after adding delegates also showing same error
1.Open terminal
sudo gem install cocoapods
2.Setup the cocoapods master repo
pod setup
download the master repo. The size is big approx 370.0MB
3.Create xcode project and select root directory in terminal.
cd "your XCode project root directory"
4.Then type
pod init
5.Then open your project's podfile by typing in terminal
open -a Xcode Podfile
6.Add your project's dependencies in open text podfile.
**for ex.** pod 'CVCalendar', '~> 1.5.2'
7.Then install pods into your project by typing in terminal
pod install
Now close your xcode project and open .xcworkspace xcode project file.
Happy Coding.
Also refer cocoapods link. https://cocoapods.org/
Related
I know this have been asked multiple times, but I still couldn't find the right answer.
I have a project (React Native) that already has a lot of code, lots of dependencies, xcode tweaks, etc. Far away from a vanilla project.
I want to add cocoa pods to it because some third party library can only be installed with it. However, I can't find anywhere information about if I need to "migrate" all my third party packages as well to cocoa pods (move all the linked dependencies there), or is it enough to create a fresh pod file with just those two new dependencies, and everything else should work just fine.
Install CocoaPods on System
Step.1 Open Terminal and enter the following command:
sudo gem install cocoapods
Create Podfile for Project
Step.2 now you need to close Xcode.
Open Terminal at project's root folder
Step.3 Next, enter below command to create podfile:
pod init
Edit podfile
Note: Make sure we will edit podfile with Xcode not TextEdit etc.
Step.4 Type this command to open the Podfile using Xcode for editing:
open -a Xcode Podfile
Step.5 update pode file what you want.
for example
pod 'SwiftForms'
when you add this line it wii installing at next step :)
let's go for install
Step.5 Enter the following command in Terminal and hit Enter
pod install
Thats it!! we have done.
Open Project with pods
Now go to the project folder,we can see that CocoaPods created a new project_name.xcworkspace file and a Pods folder.
open project_name.xcworkspace with xcode
This article has the answer I needed in a very similar situation: https://medium.com/#soufianerafik/how-to-add-pods-to-an-xcode-project-2994aa2abbf1
Essentially this:
install Cocoapods, if needed
terminal to your project root
pod init
pod install
I am trying to install cocoa pods into my project, so followed installation of pod file setup. So, latest pods installed to my system.
When I tried to install pod file to my project throwing following error.
But, pod file create with blank.
I have given following command and getting following error :
MacBook-Pro:Videos username$ pod install
Analyzing dependencies
Downloading dependencies
Generating Pods project
Integrating client projects
[!] Could not automatically select an Xcode workspace. Specify one in your Podfile like so:
workspace 'path/to/Workspace.xcworkspace'
And I tried Pod init also, if I try to open pod file, its showing empty pod file. And not even showing Target which is default pod file setup.
Anyone suggest me, how to fix this.
This is the general approach while installing pod. Make sure you follow these and it should work fine (I am assuming cocoa pods are installed on your system) So your issue lies in one of the following steps:
Go to the project root directory - cd root_directory_path
pod init
Open pod file and add required pods (See library installation guide. Each has one)
pod install
Empty pod does not get created usually. But even if it does, you can just copy the format of pod file contents into your file and install the pod.
As to your empty pod file, reinstall cocoa pods on your system. Also make sure pod is uninstalled from project/workspace you are working on. There might be a faulty installation earlier.
I downloaded a sample project to learn how to make a UIPageViewController, and I am trying to essentially fork that project and need to add a third-party library. Right now, it does not look like I have a .xcworkspace file in my project. When I try and install the cocoapods, I first run
sudo gem install cocoapods - in the specific project directory in my terminal
pod install - in that same directory
I am receiving an error in the terminal "No podfile found in the project directory."
Is this happening because I don't have a .xcworkspace file? Am I installing the podfile correctly?
Steps to add CocoaPods to manage dependencies in your project:
sudo gem install cocoapods -> This installs CocoaPods as a piece
of software on your machine.
Go to the root of your project directory and execute pod init ->
This will add a base Podfile to your project.
Add the external dependencies that you have to this Podfile by editing it.
Run pod install which will fetch all the external dependencies
mentioned by you, and associate it with a .xcworkspace file of
your project. This .xcworkspace file will be generated for you if
you already do not have one.
From here on, you should use .xcworkspace file instead of .xcproject / .xcodeproj.
Example Podfile Syntax:
target 'MyApp' do
pod 'AFNetworking', '~> 3.0'
end
Where AFNetworking is the pod and 3.0 is the specific version that I want to install.
Documentation: Using CocoaPods
Just posting for anyone that encountered this issue while working on a react native project.
sudo gem install cocoapods
this installs cocoa pods to your machine
cd projectDirectory cd into your project directory
cd ios cd into the ios directory of your project, is you list items that are in this folder, you would most likely see a podfile there.
pod install
If you want to add a library from GitHub to your own project, after installing gems, do firstly pod init look at from GitHub cocoapod description and then add it after target line in podfile.
Save and run "pod install".
It would be successfully added on your project.
Don't forget to call pod install in the Project folder of your project (not in the root).
Open a terminal, if you use VSCode, you can just run the following from the terminal
Do a cd <project_name> to your flutter project directory
Run cd iOS
Then run pod install
So I added for example, #import "test/test.h" and when I do command click on it, it goes the the .h file so I think it reads it. yet when I build it says cannot find .h file.
I've uninstalled pods from my project and reintegrated pods few times now and still the same issue.
Ive tried doing a clean as well.
I notice that under Frameworks in my app, Pods_App.framwork is red if that means its missing or its normal?
Try this
#import <test/test.h>
"test/test.h" will search the file in the current source directory whereas <test/test.h> searches in the header search paths
Quite Xcode and open your .xcworkspace again and try to import like this:
#import <test.h>
Try this one.
CocoaPods
Install CocoaPods if not already available:
$ [sudo] gem install cocoapods
$ pod setup
Change to the directory of your Xcode project:
$ cd /path/to/MyProject
$ touch Podfile
$ edit Podfile
Edit your Podfile and add [COCOA pod FILE name]:
platform :ios, '6.0'
pod 'FILE NAME'
Install into your Xcode project:
$ pod install
Open your project in Xcode from the .xcworkspace file (not the usual project file)
if you Already install cocoa pod file, Then only open Below file:
$ open MyProject.xcworkspace
I was looking for integrating cocoapods to my existing xcode projects.
I found these few post but they are based on issue instead my problem.
not able to acess installed pods framework
How to add cocoapods to existing workspace not project (this one is for work-space not project)
Making a CocoaPod from an existing Xcode project (this one is more on integrating swift with objective c project)
So I spending quality time i did for my project.
I am sharing step by step integration in my answer post.
please feel free to suggest and improvement.
happy to learn and share
Install CocoaPods on System
Step.1 Open Terminal and enter the following command:
sudo gem install cocoapods
Create Podfile for Project
Step.2 now you need to close Xcode.
Open Terminal at project's root folder
Step.3 Next, enter below command to create podfile:
pod init
Edit podfile
Note: Make sure we will edit podfile with Xcode not TextEdit etc.
Step.4 Type this command to open the Podfile using Xcode for editing:
open -a Xcode Podfile
Step.5 update pode file as shown below screenshot, save and close.
Install lib/framework
Now we have added our required lib/framework pod command
pod 'SwiftForms'
let's go for install
Step.5 Enter the following command in Terminal and hit Enter
pod install
Result screen
Thats it!! we have done.
Open Project with pods
Now go to the project folder,we can see that CocoaPods created a new project_name.xcworkspace file and a Pods folder.
open project_name.xcworkspace with xcode
your project structure should look like