I using Cocoapods/xcodeproj gem to generate my Xcode projects, for a framework in the same project I can do
common = project.targets.find { |t| t.name == "TestCommon" }
target.frameworks_build_phases.add_file_reference(common.product_reference)
But this doesn't work if framework and the target
are from separate projects but in the same workspace.