From 5d14c910747bb0b1cbc5fdcb35043681a5dfc93a Mon Sep 17 00:00:00 2001 From: Alexei Lozovsky Date: Sat, 9 May 2020 17:45:50 +0300 Subject: [PATCH] Set accurate minimum SDK version in Info.plist It is also necessary to set matching minimum SDK version in Info.plist file of the frameworks. Extract the version and replace it in Info.plist by pattern. --- assets/AppleTV/Info.plist | 2 +- assets/MacOSX/Info.plist | 2 +- assets/WatchOS/Info.plist | 2 +- assets/iPhone/Info.plist | 2 +- create-openssl-framework.sh | 6 ++++++ 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/assets/AppleTV/Info.plist b/assets/AppleTV/Info.plist index d18bc32..bb6bd7a 100755 --- a/assets/AppleTV/Info.plist +++ b/assets/AppleTV/Info.plist @@ -19,6 +19,6 @@ CFBundleVersion 1 MinimumOSVersion - 11.0 + $(MIN_SDK_VERSION) diff --git a/assets/MacOSX/Info.plist b/assets/MacOSX/Info.plist index ad76608..bb6bd7a 100755 --- a/assets/MacOSX/Info.plist +++ b/assets/MacOSX/Info.plist @@ -19,6 +19,6 @@ CFBundleVersion 1 MinimumOSVersion - 10.11 + $(MIN_SDK_VERSION) diff --git a/assets/WatchOS/Info.plist b/assets/WatchOS/Info.plist index b5d8c76..bb6bd7a 100755 --- a/assets/WatchOS/Info.plist +++ b/assets/WatchOS/Info.plist @@ -19,6 +19,6 @@ CFBundleVersion 1 MinimumOSVersion - 4.0 + $(MIN_SDK_VERSION) diff --git a/assets/iPhone/Info.plist b/assets/iPhone/Info.plist index d18bc32..bb6bd7a 100755 --- a/assets/iPhone/Info.plist +++ b/assets/iPhone/Info.plist @@ -19,6 +19,6 @@ CFBundleVersion 1 MinimumOSVersion - 11.0 + $(MIN_SDK_VERSION) diff --git a/create-openssl-framework.sh b/create-openssl-framework.sh index 42a2603..0fafd9f 100755 --- a/create-openssl-framework.sh +++ b/create-openssl-framework.sh @@ -157,6 +157,9 @@ if [ $FWTYPE == "dynamic" ]; then lipo -create ${DYLIBS[@]} -output $FWDIR/$FWNAME cp -r include/$FWNAME/* $FWDIR/Headers/ cp -L assets/$SYS/Info.plist $FWDIR/Info.plist + MIN_SDK_VERSION=$(get_min_sdk "$FWDIR/$FWNAME") + sed -e "s/\\\$(MIN_SDK_VERSION)/$MIN_SDK_VERSION/g" \ + -i '' "$FWDIR/Info.plist" echo "Created $FWDIR" check_bitcode $FWDIR else @@ -176,6 +179,9 @@ else libtool -static -o $FWDIR/$FWNAME lib/libcrypto-$SYS.a lib/libssl-$SYS.a cp -r include/$FWNAME/* $FWDIR/Headers/ cp -L assets/$SYS/Info.plist $FWDIR/Info.plist + MIN_SDK_VERSION=$(get_min_sdk "$FWDIR/$FWNAME") + sed -e "s/\\\$(MIN_SDK_VERSION)/$MIN_SDK_VERSION/g" \ + -i '' "$FWDIR/Info.plist" echo "Created $FWDIR" check_bitcode $FWDIR else