From 4e4384f0a3be2932400e0ca715a38cce8e864869 Mon Sep 17 00:00:00 2001 From: Kyriakos Sidiropoulos Date: Tue, 9 Jul 2024 16:23:59 +0200 Subject: [PATCH] refa (Laerdal.Mac.CompileAndGenerateFatLibs.sh): if no $XCODEBUILD_TARGET_SDK_VERSION is specified then we set it to a reasonable default for iphoneos (17.2) and maccatalyst (14.2) --- .../Laerdal.Mac.CompileAndGenerateFatLibs.sh | 9 ++++++++- .../Laerdal.McuMgr.Bindings.iOS.csproj | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Laerdal.McuMgr.Bindings.MacCatalystAndIos.Native/Laerdal.Mac.CompileAndGenerateFatLibs.sh b/Laerdal.McuMgr.Bindings.MacCatalystAndIos.Native/Laerdal.Mac.CompileAndGenerateFatLibs.sh index 39d47270..9d19ba9a 100755 --- a/Laerdal.McuMgr.Bindings.MacCatalystAndIos.Native/Laerdal.Mac.CompileAndGenerateFatLibs.sh +++ b/Laerdal.McuMgr.Bindings.MacCatalystAndIos.Native/Laerdal.Mac.CompileAndGenerateFatLibs.sh @@ -11,10 +11,17 @@ declare XCODEBUILD_TARGET_SDK="${XCODEBUILD_TARGET_SDK:-iphoneos}" declare XCODEBUILD_TARGET_SDK_VERSION="" # xcodebuild -showsdks +if [ "$XCODEBUILD_TARGET_SDK" == "iphoneos" ] && [ -z "$XCODEBUILD_TARGET_SDK_VERSION" ]; then # ios + XCODEBUILD_TARGET_SDK_VERSION="17.2" + +elif [ "$XCODEBUILD_TARGET_SDK" == "macosx" ] && [ -z "$XCODEBUILD_TARGET_SDK_VERSION" ]; then # maccatalyst + XCODEBUILD_TARGET_SDK_VERSION="14.2" +fi + declare SWIFT_BUILD_CONFIGURATION="${SWIFT_BUILD_CONFIGURATION:-Release}" declare SUPPORTS_MACCATALYST="${SUPPORTS_MACCATALYST:-NO}" -declare XCODEBUILD_TARGET_SDK_WITH_VERSION_IF_ANY="$XCODEBUILD_TARGET_SDK$XCODEBUILD_TARGET_SDK_VERSION" # if the version is the empty string then the latest version of the sdk will be used which is fine +declare XCODEBUILD_TARGET_SDK_WITH_VERSION_IF_ANY="$XCODEBUILD_TARGET_SDK$XCODEBUILD_TARGET_SDK_VERSION" declare SWIFT_OUTPUT_PATH="${SWIFT_OUTPUT_PATH:-./VendorFrameworks/swift-framework-proxy/}" diff --git a/Laerdal.McuMgr.Bindings.iOS/Laerdal.McuMgr.Bindings.iOS.csproj b/Laerdal.McuMgr.Bindings.iOS/Laerdal.McuMgr.Bindings.iOS.csproj index 602e7c62..73425131 100644 --- a/Laerdal.McuMgr.Bindings.iOS/Laerdal.McuMgr.Bindings.iOS.csproj +++ b/Laerdal.McuMgr.Bindings.iOS/Laerdal.McuMgr.Bindings.iOS.csproj @@ -159,7 +159,7 @@ - +