13

I am new to CocoaPod and IOS in general, I am trying to use a framework I built locally in my podfile as follows:

# Pods for Example
pod 'OsonWidget', :path => "../OsonWidget/"

when I run a pod install and open the .xcworkspace of the project, the framework gets saved under Pods/Development pods. So my question is what is Development pods

Jonas
  • 121,568
  • 97
  • 310
  • 388
Oto-Obong Eshiett
  • 527
  • 1
  • 8
  • 17
  • You've probably already seen this, since you are this far along, but there are more details here: https://guides.cocoapods.org/making/making-a-cocoapod.html – livingtech Dec 05 '19 at 16:33

2 Answers2

10

Normally in Podfile you point to the repo with its git name and your intended version.

You’re not doing that. Instead you are pointing to the pod by the :path identifier in the Podfile.

Other than the two ways mentioned above, there are other ways to point to a repo.


Obviously you are locally pointing to a pod, ie the pod was not fetched from the actual repo, implying that you own the pod and you’re developing the pod, you want to make changes to it and immediately see how the changes work for you in your Example app. Hence it’s named ‘development pods’.

Any change you make will be reflected into the Example project. Though if you add a new file, then you need to run pod install again so the projectfile gets updated.


This is slightly different from other dependency managers where the term 'development' is used for dependencies that are necessary for testing, benchmarking, and other developer tasks. Example with Ruby Gems, you have add_development_dependency vs. add_runtime_dependency

With CocoaPods the decision to use something as development vs. deployment is per file i.e. whether or not a pod/framework imports a file.

This all means you could have a file in your test target i.e. only import the pod in your test target and never include it in production e.g. the KIF pods. But mainly if you import a pod in your production code, then you'd need to import it again in files you have under you unit test target.

mfaani
  • 33,269
  • 19
  • 164
  • 293
  • 4
    reason why I asked is cause I can see my library in development pod, but when I try and use it I get `No such module 'OsonWidget'` – Oto-Obong Eshiett Dec 05 '19 at 21:28
  • that is in the menubar `Product > Build` ? yes I have – Oto-Obong Eshiett Dec 05 '19 at 21:34
  • Can you let me know if you’ve tried answers from https://stackoverflow.com/questions/29994331/no-such-module-restkit-with-cocoapods-and-swift – mfaani Dec 05 '19 at 21:43
  • I’m sorry I don’t know of any other solution:( – mfaani Dec 07 '19 at 02:49
  • Great answer. Makes perfect sense. This explains why all React Native modules are shown under Development Pods But the naming it as "Development" is a terrible choice. It implies that those are the pods that help you build the actual executables similar to "dev dependencies" of node.js and package.json file. But no. Development pods will also be included in the executables. – Cüneyt Aliustaoğlu Feb 09 '21 at 01:20
  • 1
    @CüneytAliustaoğlu that's a good point. I just added a new section to elaborate that – mfaani Feb 09 '21 at 02:02
4

I did some digging on cocoapods.org, and found this snippet:

Development Pods are different from normal CocoaPods in that they are symlinked files, so making edits to them will change the original files, so you can work on your library from inside Xcode. Your demo & tests will need to include references to headers using the #import <MyLib/XYZ.h> format. https://guides.cocoapods.org/making/using-pod-lib-create

livingtech
  • 3,570
  • 29
  • 42