$ cd tools
$ export api=16
$ ./build-android-openssl.sh arm
$ ./build-android-nghttp2.sh arm
$ ./build-android-curl.sh arm
$ export api=21
$ ./build-android-openssl.sh arm64
$ ./build-android-nghttp2.sh arm64
$ ./build-android-curl.sh arm64
You must build openssl and nghttp2(support http2) first
Others
OpenSSL for Android is build with libz support using dynamic
link. libz is publically provided by Android system.
Demo
iOS
Xcode version 11.3.1
The latest available example is in the demo2 folder (/openssl_for_ios_and_android/example/ios/demo2).
Copy libcrypto-universal.a, libcurl-universal.a, libnghttp2-universal.a, libssl-universal.a four files to folder (/openssl_for_ios_and_android/example/ios/demo2/test_curl_with_ssl_and_http2_ios/test/lib)
Use Xcode open project test.
Android
Android Studio 3.5.3
The latest available example is in the demo2 folder (/openssl_for_ios_and_android/example/android/demo2).
Copy libcrypto.a, libcurl.a, libnghttp2.a, libssl.a four files to folder (/openssl_for_ios_and_android/example/android/demo2/test_curl_with_ssl_and_http2_android/app/src/main/cpp/test/lib) (armeabi-v7a, arm64-v8a, x86_64)
Use Android Studio open project test.
How to use
For iOS
Copy lib/libcrypto.a and lib/libssl.a and lib/libcurl.a to your project.
Copy include/openssl folder and include/curl folder to your project.
Add libcrypto.a and libssl.a and libcurl.a to Frameworks group and add them to [Build Phases] ====> [Link Binary With Libraries].
Add openssl include path and curl include path to your [Build Settings] ====> [User Header Search Paths]
About "__curl_rule_01__ declared as an array with a negative size" problem
When you build cURL for arm64 you will get this error.
请发表评论