0

There are already several SO questions that address this issue, but I haven't found one that completes addresses my situation.

I have projects X, Y, and Z, that all share a common framework C. The projects and the framework all use Cocoapods. I would ideally have three separate Xcode projects that all include the common framework C. So I would have, X+C, Y+C, and Z+C. Then, when I push X+C, I want it to push the changes of X to repository X, and the changes of C to repository C. I would also like to be able to pull changes from C into X, Y, or Z. I would like to work on framework from within project X, Y, or Z, and debug the framework from each of the projects X, Y, or Z.

Is this currently possible? I know there is the concept of submodules, but it doesn't sound very robust (likely to fail with branches).

7
  • Yes it's possible with pods. You can create private framework C Commented Jul 26, 2017 at 18:58
  • So my framework would become a Pod? I've tried this approach, but it didn't seem to allow me to work on the framework in real-time. I had to update the framework every time. Or is there another way? Commented Jul 26, 2017 at 18:59
  • No. If you define path for your C framework in podfile then it'll be generated as development pods and you can debug and edit it. (example pod 'Alamofire', :path => '~/Documents/Alamofire') Commented Jul 26, 2017 at 19:05
  • I would then define the path to be outside of any of my projects' paths. Each project would have a Podfile that refers to this path. I would just have to make sure that I define the path correctly on each machine where I clone the repository. I assume a relative path would be helpful in this case? Commented Jul 26, 2017 at 19:07
  • Yes a relative path its good idea. You can define framework in this same git repository or add submodule for your git repository project Commented Jul 26, 2017 at 19:13

1 Answer 1

1

Yes it's possible with pods. You can create private framework C.

If you define path for your C framework in podfile for your projects then the framework will be generated as development pods and you can debug and edit it.

Example part of podfile

'C', :path => './C/Source')

You can use relative path. Also you can define framework in this same git repository or add submodule for your git repository project

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.