I would like to use an existing pod, modify it to fit my needs and finally use it in my Podfile.
So far for the pod I did :
edit the code
commit the new code into a new branch
remove the github origin in the pod's podsspec
specify the new branch in my podfile with :branch
Now I'm stuck because I cannot get CocoaPods to checkout the modified pod. I tried with :git => 'file:///vendor_custom/test' but it doesn't seems to take into account a relative path. I also copied the .git content and changed it to bare repository type. No luck.
Any pointers? Thanks
Oh. It was right in the documentation here.
pod 'YourCustomPod', :path => 'relative/path/...'
In this case you'll miss the future updated from the library which might be bug-fixes or future updates
There is another way in which you can customise it as well as update it in future
Here is an article which i have written explaining the same.
https://medium.com/#mihirpmehta/how-to-modify-cocoapods-library-within-pods-647d2bf7e1cb
Related
I created a Cocoapod which can be accessed here:
https://cocoapods.org/pods/SFFontFeatures
This pod installs and works great in when linked to apps.
However, it doesn't show a page for my pod on the cocoapods.org website. When I go to the above URL, it redirects directly to my github page.
Just about every pod I see listed on the website has their own page. Is there a way to configure my pod so that I get a page on cocoapods.org?
Thanks.
This is a known CocoaPods issue with the indexer. See https://github.com/CocoaPods/CocoaPods/issues/9116 and follow https://github.com/CocoaPods/cocoapods.org/issues/424
I support podspec NotifySDK. Now its version is 1.0.8 (published and available through cli).
Problems
Cocoapods.org is sure that current version is 1.0.6 despite the fact that this version was changed more than 2 weeks ago.
I absolutely don't understand what I should to do to show Pod page on cocoapods.org. Cocoapods redirects me to my site.
Attempts to fix
I tried to find answers on stackoverflow and on github but I can't. The most often recommendation is to wait but 2 weeks is enough time to update indexes.
During reading source of cocoapods I encountered few interesting things but they didn't help me.
I found out that cocoapods.org > app.rb uses cocoadocs metrics for presentation pod info.
def metrics
pods.outer_join(:github_pod_metrics).on(:id => :pod_id).join(:cocoadocs_pod_metrics).on(:id => :pod_id)
end
but cocoadocs is deprecated. Or not?
Project cocoapods-metadata-service contains next string in README:
Downside: This will only work for Open Source projects on GitHub.
My project isn't opensource. But frameworks are available on github.com
It seems to me that metrix are incomplete. Page http://metrics.cocoapods.org/api/v1/pods/NotifySDK shows github metrics without cocoadocs.
I would be appreciate for your help.
Also may be you can answer to next questions:
Is there any way to force reindex podspec?
Is there scheme of Cocoapods infrastructure?
Is there any way to get database of cocoapods?
I am getting a No such module Toaster. I have installed the pod, also after searching on SO, I fixed the red Pod_Project.Framework issue. Now its gray. I also verified Framework Search Path's and ensured that the Pod in question is recursive.
I have read thru this and this. Ideally I expected that things should have worked by default, just install the Pod and import and it should work. Is this expectation incorrect ? Should I need to change settings everytime I install a pod ?
EDIT 1
Also added Toaster pod to the Framework Search Path
Still the same No such module error on the import.
EDIT 2
I tried opening the .xcworkspace. But same issue again.
#siddharth as you mention above is correct. But Linked FrameWorks and Libraries are not in build Settings. It is In Build Phases
I've created a pod specification for learning, and now I'd like to remove it as it is shown under my name when searching for pods. I've looked everywhere in the documentation and couldn't find how to do it.
CocoaPods doesn't support pod deletions, you should release a new version with the deprecated flag set. We're working on figuring out how to support deletions, but it's a long process and we want to ensure it's right.
I am wondering what is the best way to include a demo project with a CocoaPod. In particular, I want this to a be a component that anyone can try using the pod try command.
I see two options:
option 1: embedded project in Examples/ with a Podfile
Here the Pod contains an embedded project, which uses a Podfile to reference the pod itself.
This is what is suggested by the directory structure produced via the pod lib create command, and by the CocoaPods documentation.
option 2: embedded project in Demo/ using pod as a resource
Here the Pod contains an embedded project, where the Xcode project file uses a relative path to refer directly to resources from the pod itself.
This is what I see in various examples in the wild, and it is what is working right now in a Pod I am authoring.
As CocoaPods is still in flux, I am wondering if one way is more "blessed" than the other. Is the documentation suggesting option 1 out of date? Or is the code supporting option 2 out of date? Will both work with pod try going forward?
Please, see as also this answer where demo project search heuristics are explained.
The best solution is to look through the def pick_demo_project(dir) routine in the try-plugin source https://github.com/CocoaPods/cocoapods-try/blob/master/lib/pod/command/try.rb#L133 to see the actual demo choosing options.