OpenSSL CocoaPod iOS with Bitcode?

后端 未结 3 1907
礼貌的吻别
礼貌的吻别 2021-02-15 11:45

Is there an OpenSSL cocoapod that works with bitcode enabled? Previously I was using the pod \'OpenSSL\', but I want to have bitcode in my app. Is there any way to

相关标签:
3条回答
  • 2021-02-15 12:20

    I didn't encounter any pod for openSSL with bitcode, but if you build it yourself, it is possible. As you mentioned yourself, you can use OpenSSL-for-iOS (https://github.com/x2on/OpenSSL-for-iPhone) and just run ./build-libssl.sh

    Then you will see some libraries with the openSSL output. See how it has been linked and used in the OpenSSL-for-iOS example project, and try to do the same in your project.

    0 讨论(0)
  • 2021-02-15 12:25

    There is an openssl-ios-bitcode pod now, currently with OpenSSL 1.0.212.

    0 讨论(0)
  • 2021-02-15 12:36

    I can answer this question, as I figured out how to do it. Since there is no official CocoaPod, you will have to use a build script to build it yourself. Here is the build script that I used: https://gist.github.com/felix-schwarz/c61c0f7d9ab60f53ebb0

    This build script will generate two folders for you, one called lib and another called include. Go to your project settings and go to Build Phases. Open the section called Link Binary With Libraries. Then, open the lib folder and drag libcrypto_iOS.a and libssl_iOS.a into the Link Binary With Libraries section.

    Next, go to Build Settings. Under the Search Paths section, Go to Header Search Paths, double click the field, which will open another box. In there, drag the include folder. Also make sure that the Library Search Paths have the lib folder.

    Hope this helps!

    0 讨论(0)
提交回复
热议问题