cocoapods-packager icon indicating copy to clipboard operation
cocoapods-packager copied to clipboard

Generated podspec should include `spec.frameworks` and `spec.libraries` from dependencies

Open jtreanor opened this issue 11 years ago • 6 comments

The generated podspec will currently not work if any of the dependencies has any spec.libraries or spec.frameworks which are not explicitly also included in the project's podspec.

For example if SocketRocket is a dependency, the host app will not know to link icucore.

jtreanor avatar Mar 09 '15 13:03 jtreanor

Noticed that this is actually a duplicate of #26

neonichu avatar Apr 02 '15 23:04 neonichu

I'm not sure this is a duplicate of #26 spec.libraries and spec.framework are for dynamic system libraries and framework like icucore or CoreLocation.framework, we shouldn't merge them into the final framework (and I'm not sure we can).

vavvolo avatar Apr 03 '15 11:04 vavvolo

Yes, I agree. This refers to a simple change in the generated podspec only.

jtreanor avatar Apr 03 '15 11:04 jtreanor

You're right, shouldn't close duplicates after midnight :)

neonichu avatar Apr 03 '15 11:04 neonichu

This is still a bug right? Where would the fix go?

djMax avatar Mar 01 '16 15:03 djMax

I think the idea would be to use libtool to integrate them into the binary, similar to the dependencies build as part of the regular process https://github.com/CocoaPods/cocoapods-packager/blob/master/lib/cocoapods-packager/builder.rb#L128 for static libs or they would need to be added to the linker flags for linking the dynamic libraries in the —dynamic case https://github.com/CocoaPods/cocoapods-packager/blob/master/lib/cocoapods-packager/builder.rb#L251.

We would need to check the vendored libraries and frameworks because we would not be able to integrate existing dynamic libraries easily, as far as I know. This kind of check is implemented in CocoaPods itself already here https://github.com/CocoaPods/CocoaPods/blob/46c26b0e89507b46e4258700a792f67e0bafb84f/lib/cocoapods/sandbox/file_accessor.rb#L372.

neonichu avatar Mar 07 '16 05:03 neonichu