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.
The InnerTarget
is a framework target inside TalkTab
project which is added as a subproject to the MainTarget
workspace.
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…