I am trying to add local pods to my objective c iOS project. Is there a way to use the rootpath of my project as relative path? The only way I got it to work is by using something like this:
pod 'ObjCPod', :path => '~/Documents/iOS-Projects/MyApp/libraries/LocalPod/'
This wouldn't work if I moved the Project folder or tried to build the project on another machine.
I would like to have something like this:
pod 'ObjCPod', :path => '$(SRCROOT)/libraries/LocalPod/'
Is there a way to do that?
Run open Podfile. Which opens the Podfile in textEdit. Add pod'CorePlot', '~> 1.4' to it and save. Run pod install -- NOTE* that is **pod update if already installed.
The Podfile is located in the root of the Pods project. An easy way to open it is via "Open Quickly" (Shift Cmd O) typing Podfile.
Podfile. lock is used to make sure that every members of the team has the same versions of pods installed on the project. This file is generated after you run the command: pod install. It gets updated when you run pod install or pod update.
Yes there is a way to do that, I have a project that use cocoapods and have custom pods in it, in the folder where you have your PodFile put your libraries folder and then modify your podFile to
pod 'ObjCPod', :path => 'libraries/LocalPod/'
Should work, Hope this helps
If you would like to develop a Pod in tandem with its client project you can use :path
.
pod 'Alamofire', :path => '~/Documents/Alamofire'
Using this option CocoaPods will assume the given folder to be the root of the Pod and will link the files directly from there in the Pods project. This means that your edits will persist between CocoaPods installations. The referenced folder can be a checkout of your favourite SCM or even a git submodule of the current repo.
Note that the podspec
of the Pod file is expected to be in that the designated folder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With