Situation
I have a static Library Project which references a few other static Libraries. To distribute my (company internal) Library I added a podspec file. I added the third party libraries to the vendored_libraries like this:
spec.vendored_libraries = "dependencies/libraries/**/*.a"
and the libraries command like this:
spec.libraries = "AfariaSLL", "ClientHubSLL", "Connectivity", "CoreServices", "Datavault", "E2ETrace", "Logger", "MAFLogger", "MAFLogonManagerNG", "MAFLogonUING", "MAFUIComponents", "MAFUIHelper", "Parser", "PerformanceLib", "Request", "sqlcipher", "crypto", "MAFFormatters", "MAFLocaleAwareControls", "MAFZipHelper", "ssl", "xml2", "stdc++", "z"
When i install the pod to one of my projects, the *.a files are copied as expected and referenced within the Pods.debug.xcconfig and Pods.release.xcconfig files like this:
OTHER_LDFLAGS = -ObjC -all_load -stdlib=libstdc++ -l"AfariaSLL" -l"ClientHubSLL" -l"Connectivity" -l"CoreServices" -l"Datavault" -l"E2ETrace" -l"Logger" -l"MAFFormatters" -l"MAFLocaleAwareControls" -l"MAFLogger" -l"MAFLogonManagerNG" -l"MAFLogonUING" -l"MAFUIComponents" -l"MAFUIHelper" -l"MAFZipHelper" -l"Parser" -l"PerformanceLib" -l"Pods-SBBSMPLib" -l"Request" -l"crypto" -l"sqlcipher" -l"ssl"
Until here everything works fine.
Problem
Not every Project needs all of the vendored libraries. So I tried to just reference the required libraries like this:
spec.libraries = "AfariaSLL", "ClientHubSLL", "Connectivity", "CoreServices", "Datavault", "MAFLogonManagerNG", "MAFLogonUING", "MAFUIComponents", "Request"
and hoped that it would have an impact to the OTHER_LDFLAGS
. But unfortunately the OTHER_LDFLAGS
remains the same. Even when i completely remove the spec.libraries
line the OTHER_LDFLAGS
don't change.
Summary
How can i achieve that the third party libraries are copied to the projects but not all are referenced within the OTHER_LDFLAGS
?
Thank you so much!