Skip to content

Commit f0ccb50

Browse files
committed
Fix bug in Mac Catalyst and update to 15.0 default
1 parent 1192ae0 commit f0ccb50

File tree

3 files changed

+11
-14
lines changed

3 files changed

+11
-14
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The build script accepts several arguments to adjust versions and toggle feature
2828
-e Compile with OpenSSL engine support
2929
-b Compile without bitcode
3030
-m Compile Mac Catalyst library
31-
-u <version> Mac Catalyst iOS min target version (default 13.0)
31+
-u <version> Mac Catalyst iOS min target version (default 15.0)
3232
-3 Compile with SSLv3
3333
-s <version> iOS min target version (default 8.0)
3434
-t <version> tvOS min target version (default 9.0)
@@ -40,7 +40,7 @@ The build script accepts several arguments to adjust versions and toggle feature
4040

4141
_OpenSSL Engine Note: By default, the OpenSSL source disables ENGINE support for iOS builds. To force this active use this and the static engine support will be included:_ `./build.sh -e`
4242

43-
_Mac Catalyst Note: Static libraries can be built for Mac Catalyst. This requires a current version of Xcode (11.6+). To build Catalyst binaries use the switch:_ `./build.sh -m`
43+
_Mac Catalyst Note: Static libraries can be built for Mac Catalyst. This often requires that you specify an recent Mac Catalyst iOS target version (e.g. 15.0). To build Catalyst binaries use the -m switch and specify the iOS target with -u:_ `./build.sh -m -u 15.0`
4444

4545
Minimum macOS, iOS and tvOS target build versions are set by default in the build scripts or can be specified using command line arguments indicated above. Apple Silicon arm64 macOS targets will need to be 11.0 or higher.
4646

build.sh

+6-6
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ BUILD_MACHINE=`uname -m`
2222
# Set minimum OS versions for target
2323
MACOS_X86_64_VERSION="" # Empty = use host version
2424
MACOS_ARM64_VERSION="" # Min supported is MacOS 11.0 Big Sur
25-
CATALYST_IOS="13.0" # Min supported is iOS 13.0 for Mac Catalyst
25+
CATALYST_IOS="15.0" # Min supported is iOS 15.0 for Mac Catalyst
2626
IOS_MIN_SDK_VERSION="8.0"
2727
TVOS_MIN_SDK_VERSION="9.0"
2828

@@ -154,7 +154,7 @@ OSARGS="-s ${IOS_MIN_SDK_VERSION} -t ${TVOS_MIN_SDK_VERSION} -i ${MACOS_X86_64_V
154154

155155
## Welcome
156156
echo -e "${bold}Build-OpenSSL-cURL${dim}"
157-
if [ "$catalyst" == "-m" ]; then
157+
if [ "$catalyst" != "" ]; then
158158
echo "This script builds OpenSSL, nghttp2 and libcurl for MacOS, Catalyst, iOS and tvOS devices."
159159
else
160160
echo "This script builds OpenSSL, nghttp2 and libcurl for MacOS, iOS and tvOS devices."
@@ -220,8 +220,8 @@ mkdir -p "$ARCHIVE/lib/iOS-fat"
220220
mkdir -p "$ARCHIVE/lib/MacOS"
221221
mkdir -p "$ARCHIVE/lib/tvOS"
222222
mkdir -p "$ARCHIVE/lib/tvOS-simulator"
223-
if [ "$catalyst" == "-m" ]; then
224-
mkdir -p "$ARCHIVE/lib/Catalyst"
223+
if [ "$catalyst" != "" ]; then
224+
mkdir -p "$ARCHIVE/lib/Catalyst"
225225
fi
226226
mkdir -p "$ARCHIVE/bin"
227227
mkdir -p "$ARCHIVE/framework"
@@ -249,7 +249,7 @@ cp openssl/tvOS/lib/libssl.a $ARCHIVE/lib/tvOS/libssl.a
249249
cp openssl/tvOS-simulator/lib/libssl.a $ARCHIVE/lib/tvOS-simulator/libssl.a
250250
cp openssl/Mac/lib/libssl.a $ARCHIVE/lib/MacOS/libssl.a
251251

252-
if [ "$catalyst" == "-m" ]; then
252+
if [ "$catalyst" != "" ]; then
253253
# Add catalyst libraries
254254
cp curl/lib/libcurl_Catalyst.a $ARCHIVE/lib/Catalyst/libcurl.a
255255
cp openssl/Catalyst/lib/libcrypto.a $ARCHIVE/lib/Catalyst/libcrypto.a
@@ -310,7 +310,7 @@ if [ "$buildnghttp2" != "" ]; then
310310
cp nghttp2/lib/libnghttp2_tvOS.a $ARCHIVE/lib/tvOS/libnghttp2.a
311311
cp nghttp2/lib/libnghttp2_tvOS-simulator.a $ARCHIVE/lib/tvOS-simulator/libnghttp2.a
312312
cp nghttp2/lib/libnghttp2_Mac.a $ARCHIVE/lib/MacOS/libnghttp2.a
313-
if [ "$catalyst" == "-m" ]; then
313+
if [ "$catalyst" != "" ]; then
314314
cp nghttp2/lib/libnghttp2_Catalyst.a $ARCHIVE/lib/Catalyst/libnghttp2.a
315315
xcodebuild -create-xcframework \
316316
-library $ARCHIVE/lib/iOS/libnghttp2.a \

example/iOS Test App/README.md

+3-6
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,11 @@ This is a test app for iOS using the curl, openssl and nghttp2 libraries.
77
Build the libraries with Mac Catalyst support:
88

99
```bash
10-
# For x86-64 Build Nodes
11-
./build.sh -m
12-
13-
# For arm64 (m1) Build nodes
14-
./build.sh
10+
# Build Mac Catalyst Support for iOS Target 15.0
11+
./build.sh -m -u 15.0
1512
```
1613

17-
Load and build the project using Xcode (tested with version 8.2). Example lib binaries (xcframework)and header files are included but will be replaced when you run the build script.
14+
Load and build the project using Xcode. Example lib binaries (xcframework)and header files are included but will be replaced when you run the build script.
1815

1916
## Screenshot
2017

0 commit comments

Comments
 (0)