I have added frameworks( CoreLocation, MapKit) in my podspec.
In the build settings of the project, the parameter "Other linker flags" is well updated with framework parameters and everything compiles.
But the group "Frameworks" in xcode doesnot contain them, i can only see UIKit, Foundation, CoreGraphics, CoreData, SenTestingKit and libPod.a
Is it the correct behaviour ?
Yes, we don't add the file references for the frameworks. Did you experience any issue, or have any other reason for including them? We try to modify the user project as less as possible.
No issue but we think it is convenient to be able to browse the framework headers.
Ask your users to vote (pro, cons) about this request :)
Adding the frameworks to the user project is not trivial as we need to check if the framework is there, ideally we should also remove the framework if a pod is removed but we can't be sure if the user started to use them in the project.
We could add them to the Pods project though. Would that work?
In any case there is still a lot to do in CP and this is a low priority request.
Yes about adding the framework in the Pods project.
Was expecting this to work the same way as Michenux, I think, for example in the AdMob pod spec
s.frameworks = 'AudioToolbox', 'MessageUI', 'SystemConfiguration', 'CoreGraphics'
But adding this pod doesn't add those frameworks to the Pods or the user defined project, nor does it say anything on the command line.
If those frameworks are required to use this library I'd expect cocoapods to set that up for me, otherwise I have to check every podspec file for every library I use, correct? Also won't it fail until I try and run and it might not display an error that's quickly understood?
@cricketgeek CocoaPods adds the frameworks to the xcconfig file that prepares for each target. If you are experiencing linking issues it is either due to an incorrect podspec or a bug in CocoaPods.
Michenux was referring to adding the frameworks in the project as well just as a convenience to browse them.
Oops, I see that now, thanks for pointing it out. It was working, I just hadn't figured out how and got a little confused there
[Installer] Add Frameworks & Resources to the Pods project.
With this patch the Main group of the Pods project is also sorted.