Build libcurl for iOS development. This script will generate a XCFramework with embedded static libraries for arm64 and x86_64 (simulator) architectures.
The SSL library used is SecureTransport.
Script only, please download libcurl from here: https://curl.se/download.html
Tested with:
- Xcode 15.0.1
- macOS 13.6.2
- curl 8.4.0
- nghttp2 1.58.0
curl -O https://curl.se/download/curl-8.4.0.tar.gz
tar xf curl-8.4.0.tar.gz
bash build_libcurl_dist.sh curl-8.4.0
The resulting curl.xcframework
will be created in a dist
directory in the current directory.
Add the framework in the "General" tab of your target, in the "Frameworks, Libraries, and Embedded Content" section.
See WWDC 2019 Session 416 : Binary Frameworks in Swift for more info.