diff --git a/pkg/apple/iOS/fw.tmpl b/pkg/apple/iOS/fw.tmpl
index 15d68100b3a..679eb5dfe2b 100644
--- a/pkg/apple/iOS/fw.tmpl
+++ b/pkg/apple/iOS/fw.tmpl
@@ -13,7 +13,7 @@
CFBundleVersion
1.0.0
MinimumOSVersion
- 14.2
+ 12.0
CFBundlePackageType
FMWK
CFBundleInfoDictionaryVersion
diff --git a/pkg/apple/make-frameworks.sh b/pkg/apple/make-frameworks.sh
index a0ba3b9cfe8..c8ccbd28d5c 100755
--- a/pkg/apple/make-frameworks.sh
+++ b/pkg/apple/make-frameworks.sh
@@ -13,12 +13,18 @@ echo "${CODE_SIGN_IDENTITY_FOR_ITEMS}"
if [ "$PLATFORM_FAMILY_NAME" = "tvOS" ] ; then
BASE_DIR="tvOS"
SUFFIX="_tvos"
+ PLATFORM="tvos"
+ DEPLOYMENT_TARGET="${TVOS_DEPLOYMENT_TARGET}"
elif [ "$PLATFORM_FAMILY_NAME" = "iOS" ] ; then
BASE_DIR="iOS"
SUFFIX="_ios"
+ PLATFORM="ios"
+ DEPLOYMENT_TARGET="${IPHONEOS_DEPLOYMENT_TARGET}"
elif [ "$PLATFORM_FAMILY_NAME" = "macOS" ] ; then
BASE_DIR="OSX"
SUFFIX=
+ PLATFORM=
+ DEPLOYMENT_TARGET=
fi
if [ -n "$BUILT_PRODUCTS_DIR" -a -n "$FRAMEWORKS_FOLDER_PATH" ] ; then
@@ -40,9 +46,9 @@ for dylib in $(find "$BASE_DIR"/modules -maxdepth 1 -type f -regex '.*libretro.*
fwDir="${OUTDIR}/${fwName}.framework"
mkdir -p "$fwDir"
- if [ "$PLATFORM_FAMILY_NAME" = "iOS" ] ; then
+ if [ "$PLATFORM_FAMILY_NAME" = "iOS" -o "$PLATFORM_FAMILY_NAME" = "tvOS" ] ; then
build_sdk=$(vtool -show-build "$dylib" | grep sdk | awk '{print $2}')
- vtool -set-build-version ios "${IPHONEOS_DEPLOYMENT_TARGET}" "${build_sdk}" -set-source-version 0.0 -replace -output "$dylib" "$dylib"
+ vtool -set-build-version "${PLATFORM}" "${DEPLOYMENT_TARGET}" "${build_sdk}" -set-build-tool "$PLATFORM" ld 1115.7.3 -set-source-version 0.0 -replace -output "$dylib" "$dylib"
fi
lipo -create "$dylib" -output "$fwDir/$fwName"
sed -e "s,%CORE%,$fwName," -e "s,%BUNDLE%,$fwName," -e "s,%IDENTIFIER%,$fwName," iOS/fw.tmpl > "$fwDir/Info.plist"