Skip to content

Commit

Permalink
refa (Laerdal.Mac.CompileAndGenerateFatLibs.sh): if no $XCODEBUILD_TA…
Browse files Browse the repository at this point in the history
…RGET_SDK_VERSION is specified then we set it to a reasonable default for iphoneos (17.2) and maccatalyst (14.2)
  • Loading branch information
ksidirop-laerdal committed Jul 9, 2024
1 parent 5b37574 commit 4e4384f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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/}"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@

<!-- 1. build and generate the fat libs from the proxy swift project -->
<Exec WorkingDirectory="../Laerdal.McuMgr.Bindings.MacCatalystAndIos.Native" Command=" chmod +x ./Laerdal.Mac.CompileAndGenerateFatLibs.sh "/>
<Exec WorkingDirectory="../Laerdal.McuMgr.Bindings.MacCatalystAndIos.Native" Command=" SWIFT_OUTPUT_PATH='$(NativeFrameworkParentFolderpath)' XCODEBUILD_TARGET_SDK='iphoneos' XCODEBUILD_TARGET_SDK_VERSION='17.2' ./Laerdal.Mac.CompileAndGenerateFatLibs.sh "/>
<Exec WorkingDirectory="../Laerdal.McuMgr.Bindings.MacCatalystAndIos.Native" Command=" SWIFT_OUTPUT_PATH='$(NativeFrameworkParentFolderpath)' XCODEBUILD_TARGET_SDK='iphoneos' ./Laerdal.Mac.CompileAndGenerateFatLibs.sh "/>

<!-- warning its absolutely vital to remove any softlink files as they are causing -->
<!-- warning codesign to fail when using the resulting nuget in maui apps go figure ... -->
Expand Down

0 comments on commit 4e4384f

Please sign in to comment.