How to include OpenSSL on an iOS project in a way that works

后端 未结 2 496
长情又很酷
长情又很酷 2020-12-11 07:46

I have followed all tutorials on the web to do this. Everything works fine, up to the point I add this line on a class:

#import 


        
相关标签:
2条回答
  • 2020-12-11 08:20

    Make sure you have set the paths:

    In the Header Search Path I use ${SRCROOT}/macOS and set it to Recursive. Why not specify the directory and non Recursive? I searched for bugs related to XCode 11 and Header Search Path. If I set the full path it did not work. If I set it to ${SRCROOT} and recursive it failed. Odd?

    The same Library Search Path - the path to the .a files - you could just say ${SRCROOT} but this can get you in trouble if you have multuple .a files for different architectures in the same project. This threw up linking errors for me so I used ${SRCROOT}/macOS.

    0 讨论(0)
  • 2020-12-11 08:39

    The easiest solution would be to use CocoaPods - there is an OpenSSL pod...

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