Is it possible to add a local dependency to .podspec file?

podspec local dependency
podspec local source
podspec dependency
podspec dependency private repo
podspec peer dependency
local podspec
no podspec found for local path
podspec dependency git

I'm using cocoapods now I would like to add a local pod dependency in my project, something like:

s.dependency = 'my pod', :path => ''

but I think is not possibile, some ideas?

I have faced with the same issue and after lot of googling and asking on the CocoaPods github I have finally found the suitable answer.

It's not possible to set a local pod as a dependency, but it's possible to set a pod's source for a specific Podfile, which will work the same way.

E.g., in your podspec, you still have ()

s.dependency = 'my pod', '~> 1.0' # or whatever version you have

Then in your Example/demo/test project's Podfile:

pod 'my pod', :path => '/path/to/the/local/my_pod'

Then just run pod install and you will see both pods as a Development pods.

This way is very useful when you're developing 2 pods (one of which is dependend on the other) simultaneously, yet for release you will still have to publish your pod to the repo (either CocoaPods or a private repo).

Is it possible to add a local dependency to .podspec file?, I'm using cocoapods now I would like to add a local pod dependency in my project, something like: s.dependency = 'my pod', :path => '' but I think is not� Currently it is possible to specify a local dependency in a podspec file. It would be nice to support this feature in the > podfile as well. Hmm, afaik the :local option is only for use in a Podfile, not a podspec. I.e., if you have made a git clone (or git submodule, etc) in the sandbox, then you can use this option to make CocoaPods read the

You can use pod with a path

pod 'PodName', :path => 'local_path_to/name.podspec'

The full chain you can find here

cocoapods: Is it possible to add a local dependency to .podspec file?, I'm using cocoapods now I would like to add a local pod dependency in my project, something like:s.dependency = 'my pod', :path => ''but I� Note that the podspec of the Pod file is expected to be in that the designated folder. <From a podspec in the root of a library repo. Sometimes you may want to use the bleeding edge version of a Pod, a specific revision or your own fork. If this is the case, you can specify that with your pod declaration. To use the master branch of the repo:

Put the local dependency inside your pod's folder root directory, In your Podspec file, just add s.ios.dependency 'YourRootPodName/YourPodDependencyFolder' After that, create a subspace like so:

s.subspec 'YourRootPodName' do |ss| ss.source_files = 'YourRootPodName/**/*.{h,m}' end

as in this answer Cocoa podspec and path for dependency

How can i add the private dependency to podspec file? � Issue , I try to add a dependency from private repo to podspec. But it doesn't work. After run the command > pod repo push MyLib MyLib.podspec [!] 3. Editing. podspec files Edit podspec files, mainly add project libraries, hosting addresses, version numbers, exposed files, etc. 4. Upload to Git Submit projects containing configured. podspec, LICENSE to Git or private clouds. 5, fight tag. 6. Verify. podspec file Use pod spec lint to verify that the pod spec file is configured correctly.

Working with CocoaPods Lib Locally, To do that, you will need to create the Podspec file. It will only be possible to place this Lib in other projects using CocoaPods if the After adding all necessary Podspec information you should register a local repository The podspec file is expected to be in the root of the repository, if this library does not have a podspec file in its repository yet, you will have to use one of the approaches outlined in the sections below. From a podspec outside a spec repository, for a library without podspec.

Distribute Framework With CocoaPods Locally and Remotely, From Xcode, choose File > New Project to create your project > On the Framework the one copy of the resource among all applications whenever possible. CocoaPods is a popular dependency manager for iOS projects. IIRC, other than some informational metadata, the .podspec does not address how you get to that project folder, as this is handled separately. As mentioned in the comments, you can use the Podfile to use a local project, with the :path => directive pointing to a local project folder.

The Podfile, The Podfile is a specification that describes the dependencies of the targets of one or more Xcode projects. The file A Podfile can be very simple, this adds Alamofire to a single target: Besides no version, or a specific one, it is also possible to use logical operators: <Using the files from a folder local to the machine. After you have initially installed CocoaPods into your project, you can add new dependencies (or remove unused ones) by editing the Podfile. Then simply run pod install again. If you use AppCode it has nice integrated support, so that it can update Pods for you, just edit the Podfile in AppCode, and it will suggest for you to add the new

Comments
  • Possible duplicate of Cocoa podspec and path for dependency
  • Validation on your podspec fails when doing this. (Unable to find a specification for 'yoga' depended upon by 'MyLib'
  • @Tieme No need to run validation, it's just for developing/debugging a dependency pod.
  • So you remove the dependency before you submit?
  • @Tieme no, why? dependency is for a real pod. Just this approach allwos to install a local pod's version for that dependency via a project's Podfile. And for a Pod submit you're using a *.podspec, not a Podfile.