I have the following situation:
- an app
A
that embeds a frameworkF
, - this framework
F
is a private pod, and embeds a static libraryS
, - this static library
S
is also a private pod.
Here is my app A
Podfile:
platform :ios, '12.0'
use_frameworks!
source '{my_private_pod_repo}.git'
target `A` do
pod 'F', :source => '{my_private_pod_repo}.git'
end
This works since it creates a A.xcworkspace
which contains my app A
and an embedded Pods_A.framework
.
But what I would like to do, instead, would be to have a workspace that would contain these three projects. The idea is to be able to have access to the source code of every app/framework/lib, open in the same workspace – but still, I want the app to reference only Pods_A.framework
and not each lib/framework locally. Is there any way to do so with CocoaPods?
Thank you for your help
2
Answers
I believe it is not possible, im sorry. You could link multiple podfiles together so that if you change one, all of the other ones change. This is done in macOS by right-clicking on the file and pressing make alias.
Yes you can add multiple projects in a single workspace.
Let’s say you the following directory structure. (If your projects
F
andS
are separate repos, you can even add them as git submodules)Open the
A.xcworkspace
Drag and drop
A/F/F.xcodeproj
in workspaceDrag and drop
A/S/S.xcodeproj
in workspaceNow open the PodFile (In root folder A) and do the similar changes.