i am developing Framework, i have added this framework project into host project. now i want to add cocoapods pod(framework) into parent(host) project. and share same pod into child(framework) project. or is there something i can add to Podfile and it will get share with child project.
SwiftProtoBuf framework, i want to use. and i don't wish to make umbrella framework.
can we share cocoapods pod between parent and child project
platform :ios, '8.0'
use_frameworks!
workspace 'ParentApp.xcworkspace'
abstract_target 'commonpods' do
pod 'SwiftProtobuf', git: 'https://github.com/apple/swift-protobuf.git', :tag => '0.9.24'
target 'ParentApp' do
project 'ParentApp.xcodeproj'
end
target 'ChildApp' do
project 'ChildFramework/ChildApp.xcodeproj'
end
end
or do i need to add pod to both project something like
platform :ios, '8.0'
use_frameworks!
target 'ParentApp' do
project 'ParentApp.xcodeproj'
pod 'SwiftProtobuf', git: 'https://github.com/apple/swift-protobuf.git', :tag => '0.9.24'
end
target 'ChildApp' do
project 'ChildFramework/ChildApp.xcodeproj'
pod 'SwiftProtobuf', git: 'https://github.com/apple/swift-protobuf.git', :tag => '0.9.24'
end
After little Struggle, i am able to solve it, it may help some-one in need.
Create Blank .xcworkspace , Xcode->File->New->Workspace
Open your .xcworkspace file in xcode, Add your Host(partent) project into .xcworkspace
add your framework(child) project in .xcworkspace.
and Podfile structure is like.
make sure .xcworkspace is created and both your project is added into workspace, then only install pods to your project.