Bob
Bob

Reputation: 8504

cocoapods pod lib create and schemes

I am using the latest beta cocoapods release that support frameworks with xcode 6.1.1, sudo gem install cocoapods --prerelease

I then ran pod lib create podtry to create a sample app, no demo app, no testing framework, no view based testing. I then opened it in xcode and notice that it created 3 schemes, pods-podtry, pods-podtry-podtry-podtry, podtry-Example and 2 Pods targets, Pods-podtry, Pods-podtry-podtry-podtry. Can someone explain why there are 2 targets and 3 schemes? It seems like ony Pods-podtry-podtry-podtry target contains the plist.info version specified in podspec s.version field.

Upvotes: 2

Views: 523

Answers (1)

Bob
Bob

Reputation: 8504

Ok I think I figured this out, hopefully this will help someone new to cocoapods. There are 2 targets and each of the scheme has one of the 2 targets. For example, podtry-Example scheme has Pods-podtry target plus testaction has podtry test added. Pods-podtry-podtry-podtry scheme has Pods-podtry-podtry-podtry target but no test action. Pods-podtry scheme has Pods-podtry target, no test action but has a target dependency on Pods-podtry-podtry-podtry. Phew that's a mouthful but there it is.

There are a couple of things I still don't quite get though

  1. Why did cocoapods create Pods-podtry target that builds a Pods_podtry.framework in addition to podtry.framework. Ultimately I am only interested in podtry.framework and I am not sure about the purpose of Pods_podtry.framework.
  2. Why did cocoapods not create a test target like xcode normally does for a new project, instead it make that a test action target dependency.

Any insights will be much appreciated.

Upvotes: 1

Related Questions