Skip to content

Commit

Permalink
use LSMinimumSystemVersion instead of MinimumOSVersion in macOS bundl…
Browse files Browse the repository at this point in the history
…es, fixes #174
  • Loading branch information
tanersener committed Nov 7, 2021
1 parent d73c43c commit f52f6a1
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions scripts/function-apple.sh
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ create_ffmpeg_framework() {
done
fi

build_info_plist "${FFMPEG_LIB_FRAMEWORK_RESOURCE_PATH}/Info.plist" "${FFMPEG_LIB}" "com.arthenica.ffmpegkit.${CAPITAL_CASE_FFMPEG_LIB_NAME}" "${FFMPEG_LIB_VERSION}" "${FFMPEG_LIB_VERSION}"
build_info_plist "${FFMPEG_LIB_FRAMEWORK_RESOURCE_PATH}/Info.plist" "${FFMPEG_LIB}" "com.arthenica.ffmpegkit.${CAPITAL_CASE_FFMPEG_LIB_NAME}" "${FFMPEG_LIB_VERSION}" "${FFMPEG_LIB_VERSION}" "${ARCHITECTURE_VARIANT}"

echo -e "DEBUG: ${FFMPEG_LIB} framework built for $(get_apple_architecture_variant "${ARCHITECTURE_VARIANT}") platform successfully\n" 1>>"${BASEDIR}"/build.log 2>&1
done
Expand Down Expand Up @@ -477,7 +477,7 @@ create_ffmpeg_kit_framework() {
# COPYING STRIP SCRIPT FOR SHARED LIBRARY
cp ${BASEDIR}/tools/release/apple/strip-frameworks.sh ${FFMPEG_KIT_FRAMEWORK_RESOURCE_PATH} 1>>${BASEDIR}/build.log 2>&1

build_info_plist "${FFMPEG_KIT_FRAMEWORK_RESOURCE_PATH}/Info.plist" "ffmpegkit" "com.arthenica.ffmpegkit.FFmpegKit" "${FFMPEG_KIT_VERSION}" "${FFMPEG_KIT_VERSION}"
build_info_plist "${FFMPEG_KIT_FRAMEWORK_RESOURCE_PATH}/Info.plist" "ffmpegkit" "com.arthenica.ffmpegkit.FFmpegKit" "${FFMPEG_KIT_VERSION}" "${FFMPEG_KIT_VERSION}" "${ARCHITECTURE_VARIANT}"
build_modulemap "${FFMPEG_KIT_FRAMEWORK_PATH}/Modules/module.modulemap"

echo -e "DEBUG: ffmpeg-kit framework built for $(get_apple_architecture_variant "${ARCHITECTURE_VARIANT}") platform successfully\n" 1>>"${BASEDIR}"/build.log 2>&1
Expand Down Expand Up @@ -864,16 +864,29 @@ build_info_plist() {
local FRAMEWORK_ID="$3"
local FRAMEWORK_SHORT_VERSION="$4"
local FRAMEWORK_VERSION="$5"
local ARCHITECTURE_VARIANT="$6"

case ${FFMPEG_KIT_BUILD_TYPE} in
ios)
case ${ARCHITECTURE_VARIANT} in
"${ARCH_VAR_MAC_CATALYST}")
local MINIMUM_VERSION_KEY="LSMinimumSystemVersion"
;;
*)
local MINIMUM_VERSION_KEY="MinimumOSVersion"
;;
esac

local MINIMUM_OS_VERSION="${IOS_MIN_VERSION}"
local SUPPORTED_PLATFORMS="iPhoneOS"
;;
tvos)
local MINIMUM_VERSION_KEY="MinimumOSVersion"
local MINIMUM_OS_VERSION="${TVOS_MIN_VERSION}"
local SUPPORTED_PLATFORMS="AppleTVOS"
;;
macos)
local MINIMUM_VERSION_KEY="LSMinimumSystemVersion"
local MINIMUM_OS_VERSION="${MACOS_MIN_VERSION}"
local SUPPORTED_PLATFORMS="MacOSX"
;;
Expand Down Expand Up @@ -902,7 +915,7 @@ build_info_plist() {
<string>${FRAMEWORK_VERSION}</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>MinimumOSVersion</key>
<key>${MINIMUM_VERSION_KEY}</key>
<string>${MINIMUM_OS_VERSION}</string>
<key>CFBundleSupportedPlatforms</key>
<array>
Expand Down

0 comments on commit f52f6a1

Please sign in to comment.