Merge pull request #1341 from OffbandMesh/fix/1340-ipad-native
fix(#1340): run natively on iPad instead of iPhone compatibility modepull/1346/head
commit
7d86445685
@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
# Fails unless the iOS app declares iPad (UIDeviceFamily 2). Without it,
|
||||
# iPadOS runs the app in iPhone compatibility mode (#1340).
|
||||
# Usage: ios-assert-ipad.sh <path to .app>
|
||||
set -u
|
||||
PLIST="$1/Info.plist"
|
||||
i=0
|
||||
while v="$(/usr/libexec/PlistBuddy -c "Print :UIDeviceFamily:${i}" "${PLIST}" 2>/dev/null)"; do
|
||||
if [ "${v}" = "2" ]; then
|
||||
echo "UIDeviceFamily includes iPad (2)."
|
||||
exit 0
|
||||
fi
|
||||
i=$((i + 1))
|
||||
done
|
||||
echo "::error::${PLIST} does not declare iPad in UIDeviceFamily (#1340)."
|
||||
/usr/libexec/PlistBuddy -c "Print :UIDeviceFamily" "${PLIST}" || true
|
||||
exit 1
|
||||
Loading…
Reference in new issue