I want to have a Workspace that contains two projects (2 different apps), a Common (shared) project and a couple of Pods.
I have been struggling to get the App1 project to "see" the Common classes.
My thinking was:
The Podfile I have is along the lines of this:
workspace 'MyApps'
xcodeproj 'App1/App1.xcodeproj'
xcodeproj 'App2/App2.xcodeproj'
xcodeproj 'Common/Common.xcodeproj'
target :App1 do
platform :ios, '6.0'
pod 'AFNetworking', '~> 1.3.2'
xcodeproj 'App1/App1.xcodeproj'
end
target :App2 do
platform :ios, '6.0'
pod 'AFNetworking', '~> 1.3.2'
xcodeproj 'App2/App2.xcodeproj'
end
target :Common do
platform :ios, '6.0'
pod 'AFNetworking', '~> 1.3.2'
xcodeproj 'Common/Common.xcodeproj'
end
I have seen this question but I can't seem to get the Common code to be available in the Apps.
Do I have to manually update the search paths for each of the Apps projects to make it work or can this be solved via the Podfile?
i had a similar problem at work, and i found it was better to change the project structure to work with Cocoapods.
i think the right solution for you, or at least the right path to one, is to turn your common project into a local (see "Using the files from a local path" here), private pod.
i implemented my common project as such, and have my Application project also configured with CocoaPods, using that private pod.
a final word of note, when building a common library project through CocoaPods, you'll want to override the 'Other Linker Flags' build setting in that project, just like it is in the Pods project created and managed by CocoaPods.
¡let me know if this works for you!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With