Pregunta

I'm creating my first pod and I've been successfully able to define the spec and release a first version from an empty repository (only LICENSE here).

If I do

$ nano Podfile
$ cat Podfile
platform :ios, '7.0'
pod 'MyPod', '~> 0.0.1'

$ pod install

I get my pod and its dependencies.

Now if I need to actually implement my pod, should I

  • Initialize a project into my pod & install the required dependencies ?
    • In which case should I gitignore all and/or exclude files from the spec ?
  • Create a separate project using my pod ?
    • In which case would I have to push from the pod / pull from the project for each modification ?

Maybe there are other solutions, what do you suggest ?

¿Fue útil?

Solución

If you define a pod via :path it will be added as a development pod, which won't get changed/updated after initial pod install, not even during pod update. You can safely edit the files in its folder, and commit as you please.

The way I develop on a pod is to have a separate project which has this in the podfile:

  pod 'MyNewPod', :path => '~/Code/MyNewPod'

Obviously the MyNewPod folder has to contain your podspec so that the installation can be performed properly.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top