Adding pods to nested targets in iOS Xcode
I had this confusion on how to add a dependency to a nested target via Cocoapods. This may helps someone. Here is how I did it.
I had this weird structure in one of my project.
SO, I wanted to add a framework to the
InnerTarget via pods.
InnerTarget is a framework target inside
TalkTab project which is added as a subproject to the
I tried different ways. Like the given podfile below.
This might work . But for the custom pods framework that I had to add, it was throwing some error.
This is what I ended up doing.
# Uncomment the next line to define a global platform for your project
# platform :ios, ‘9.0’workspace ‘MainTarget’target ‘MainTarget’ do
# Comment the next line if you don’t want to use dynamic frameworks
use_frameworks!target 'Ucc' do
target 'InnerTarget' do
In the below line, we need to follow the
You can know more about configuring the podfile from the cocoapods official documentation here:
Hope it might help someone. thanks for reading.
If you enjoyed reading this post, please share and give some claps so others can find it 👏👏👏👏👏 !!!!
If you have any comment, question, or recommendation, feel free to post them in the comment section below!