Open cjcaufield opened 8 years ago
Specifically, when running pod lib lint on a podspec that depends on the OpenSSL pod, the following error is given:
- ERROR | [iOS] unknown: Encountered an unknown error (
The 'Pods' target has transitive dependencies that include static binaries: (
/private/var/folders/82/760vjvcs0q59xh4sd7r0l_l80000gn/T/CocoaPods/Lint/Pods/OpenSSL/lib/libcrypto.a and
/private/var/folders/82/760vjvcs0q59xh4sd7r0l_l80000gn/T/CocoaPods/Lint/Pods/OpenSSL/lib/libssl.a
)) during validation.
There's more discussion at: https://github.com/CocoaPods/CocoaPods/issues/2926 https://github.com/CocoaPods/CocoaPods/issues/3194 https://github.com/CocoaPods/CocoaPods/issues/3267
Any progress yet? Why can't OpenSSL just be converted to a dynamic library...
@cjcaufield @gerald-coddut Have you ever tried import OpenSSL as a target dependency before the framework?
eg.
target 'SomeTarget' do
pod 'OpenSSL'
pod 'FrameworkRequiresOpenSSL'
end
@BB9z Nope haven't tried it (or maybe I unconsciously did try it), but what difference will (should) it make? The reason it fails and gives the error is because of the fact the pod generates a static library however. Not because other pods in my workspace depend on OpenSSL.
Same issue here. any progress or solution yet?
@appsforall
I ended up compiling my own openSSL.framework
as Cocoapods was just unable to provide it for me.
@appsforall How did you do it? . I need to use this pod in our own pod
@geraldeersteling how can I do similar to you?
@SanyasiraoM if I recall correctly I just compiled the openSSL.framework
an added it to my project as an embedded framework...so without Cocoapods
@geraldeersteling Thanks for reply,
Can you point me to some reference, how to do that? I'm new bee in iOS
Look here, I made the framework with the shell script provided there. afterwards just add it as an embedded framework.
@geraldeersteling Thank you!
I'm also using the same. My use case is to generate pkcs12 file. So I followed https://stackoverflow.com/questions/26883342/ios-how-to-create-pkcs12-p12-keystore-from-private-key-and-x509certificate-in/41856095#41856095
I'm able to use it in a project directly.
I created pod using http://guides.cocoapods.org/making/using-pod-lib-create.html Now how to include openssl in a pod? How can I do below steps?
Add $(YOUR_PATH)/OpenSSL-for-iPhone/include to header search paths
Add $(YOUR_PATH)/OpenSSL-for-iPhone/lib to library search paths
Add libcrypto.a and libssl.a to linked frameworks and libraries
Add the following headers to the bridging header:
Project-Bridging-Header.h:
#import <openssl/err.h>
#import <openssl/pem.h>
#import <openssl/pkcs12.h>
#import <openssl/x509.h>
@geraldeersteling any references to include it as a embedded framework?
I'm not sure what you mean; the issue was creating an openSSL.framework
right? That can be done if you use the scripts in the link I provided earlier.
Embedding it in your project is as simple as going to your xcodeproj
and add it under Linked Frameworks and Libraries i.e.:
Since Cocoapods 0.36, podspecs generate frameworks and require their dependencies to also be frameworks. However, the OpenSSL pod isn't built as a framework.
There is an article about this change here: https://blog.cocoapods.org/CocoaPods-0.36/
Have you heard about this issue? Any ideas? Thanks.