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.
This commit is contained in:
Alexei Lozovsky 2020-05-09 17:45:50 +03:00
parent 54315154fb
commit 5d14c91074
5 changed files with 10 additions and 4 deletions

View File

@ -19,6 +19,6 @@
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>1</string> <string>1</string>
<key>MinimumOSVersion</key> <key>MinimumOSVersion</key>
<string>11.0</string> <string>$(MIN_SDK_VERSION)</string>
</dict> </dict>
</plist> </plist>

View File

@ -19,6 +19,6 @@
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>1</string> <string>1</string>
<key>MinimumOSVersion</key> <key>MinimumOSVersion</key>
<string>10.11</string> <string>$(MIN_SDK_VERSION)</string>
</dict> </dict>
</plist> </plist>

View File

@ -19,6 +19,6 @@
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>1</string> <string>1</string>
<key>MinimumOSVersion</key> <key>MinimumOSVersion</key>
<string>4.0</string> <string>$(MIN_SDK_VERSION)</string>
</dict> </dict>
</plist> </plist>

View File

@ -19,6 +19,6 @@
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>1</string> <string>1</string>
<key>MinimumOSVersion</key> <key>MinimumOSVersion</key>
<string>11.0</string> <string>$(MIN_SDK_VERSION)</string>
</dict> </dict>
</plist> </plist>

View File

@ -157,6 +157,9 @@ if [ $FWTYPE == "dynamic" ]; then
lipo -create ${DYLIBS[@]} -output $FWDIR/$FWNAME lipo -create ${DYLIBS[@]} -output $FWDIR/$FWNAME
cp -r include/$FWNAME/* $FWDIR/Headers/ cp -r include/$FWNAME/* $FWDIR/Headers/
cp -L assets/$SYS/Info.plist $FWDIR/Info.plist 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" echo "Created $FWDIR"
check_bitcode $FWDIR check_bitcode $FWDIR
else else
@ -176,6 +179,9 @@ else
libtool -static -o $FWDIR/$FWNAME lib/libcrypto-$SYS.a lib/libssl-$SYS.a libtool -static -o $FWDIR/$FWNAME lib/libcrypto-$SYS.a lib/libssl-$SYS.a
cp -r include/$FWNAME/* $FWDIR/Headers/ cp -r include/$FWNAME/* $FWDIR/Headers/
cp -L assets/$SYS/Info.plist $FWDIR/Info.plist 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" echo "Created $FWDIR"
check_bitcode $FWDIR check_bitcode $FWDIR
else else