project: patch settings bundle for visionOS

This commit is contained in:
osy 2023-09-26 01:47:32 -07:00
parent c6ddedc294
commit ea4906a20e
3 changed files with 86 additions and 1 deletions

View File

@ -74,7 +74,7 @@ fileprivate enum UsbSupport: Int, Identifiable {
}
}
#if os(macOS)
#if os(macOS) || os(visionOS)
@available(macOS 11, *)
struct GestureSettingsSection: View {
var body: some View {

View File

@ -161,6 +161,8 @@
<string>PSGroupSpecifier</string>
<key>Title</key>
<string>Gestures</string>
<key>Platform</key>
<string>iOS</string>
</dict>
<dict>
<key>Type</key>
@ -169,6 +171,8 @@
<string>Long Press</string>
<key>Key</key>
<string>GestureLongPress</string>
<key>Platform</key>
<string>iOS</string>
<key>DefaultValue</key>
<integer>1</integer>
<key>Titles</key>
@ -191,6 +195,8 @@
<string>Two Finger Tap</string>
<key>Key</key>
<string>GestureTwoTap</string>
<key>Platform</key>
<string>iOS</string>
<key>DefaultValue</key>
<integer>2</integer>
<key>Titles</key>
@ -211,6 +217,8 @@
<string>Two Finger Pan</string>
<key>Key</key>
<string>GestureTwoPan</string>
<key>Platform</key>
<string>iOS</string>
<key>DefaultValue</key>
<integer>3</integer>
<key>Titles</key>
@ -235,6 +243,8 @@
<string>Two Finger Swipe</string>
<key>Key</key>
<string>GestureTwoScroll</string>
<key>Platform</key>
<string>iOS</string>
<key>DefaultValue</key>
<integer>0</integer>
<key>Titles</key>
@ -255,6 +265,8 @@
<string>Three Finger Pan</string>
<key>Key</key>
<string>GestureThreePan</string>
<key>Platform</key>
<string>iOS</string>
<key>DefaultValue</key>
<integer>0</integer>
<key>Titles</key>
@ -285,6 +297,8 @@
<string>Touch Input</string>
<key>Key</key>
<string>MouseTouchType</string>
<key>Platform</key>
<string>iOS</string>
<key>DefaultValue</key>
<integer>0</integer>
<key>Titles</key>
@ -300,6 +314,28 @@
<integer>2</integer>
</array>
</dict>
<dict>
<key>Type</key>
<string>PSMultiValueSpecifier</string>
<key>Title</key>
<string>Visibility</string>
<key>Key</key>
<string>MouseTouchType</string>
<key>Platform</key>
<string>xrOS</string>
<key>DefaultValue</key>
<integer>2</integer>
<key>Titles</key>
<array>
<string>Always show cursor</string>
<string>Try hiding cursor</string>
</array>
<key>Values</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
</dict>
<dict>
<key>Type</key>
<string>PSMultiValueSpecifier</string>
@ -307,6 +343,8 @@
<string>Apple Pencil Input</string>
<key>Key</key>
<string>MousePencilType</string>
<key>Platform</key>
<string>iOS</string>
<key>DefaultValue</key>
<integer>2</integer>
<key>Titles</key>

View File

@ -2553,6 +2553,7 @@
CE2D926924AD46670059923A /* Sources */,
CE2D932B24AD46670059923A /* Frameworks */,
CE2D936924AD46670059923A /* Resources */,
CE59A7B12ABCC75F00E5FFBD /* Patch Settings bundle */,
CE2D937524AD46670059923A /* Embed Libraries */,
);
buildRules = (
@ -2632,6 +2633,7 @@
CEA45E24263519B5002FA97D /* Sources */,
CEA45F23263519B5002FA97D /* Frameworks */,
CEA45F63263519B5002FA97D /* Resources */,
CE59A7B22ABCCB7C00E5FFBD /* Patch Settings bundle */,
CEA45F71263519B5002FA97D /* Embed Libraries */,
);
buildRules = (
@ -2823,6 +2825,51 @@
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
CE59A7B12ABCC75F00E5FFBD /* Patch Settings bundle */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"$(SRCROOT)/Platform/iOS/Settings.bundle",
);
name = "Patch Settings bundle";
outputFileListPaths = (
);
outputPaths = (
"$(TARGET_BUILD_DIR)/$(CONTENTS_FOLDER_PATH)/Settings.bundle/Root.plist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "#!/bin/sh\n\nPLISTBUDDY=/usr/libexec/PlistBuddy\nROOT_PLIST=\"$SCRIPT_OUTPUT_FILE_0\"\n\nCOUNT=$($PLISTBUDDY -c \"Print :PreferenceSpecifiers\" \"$ROOT_PLIST\" | grep -c '^ }$')\n\nfor ((i = 0; i < COUNT; i++)); do\n platform=$($PLISTBUDDY -c \"Print :PreferenceSpecifiers:$i:Platform\" \"$ROOT_PLIST\" 2> /dev/null)\n if [ ! -z \"$platform\" ]; then\n if [ \"$platform\" == \"$PLATFORM_FAMILY_NAME\" ]; then\n echo \"Found entry $i for $platform\"\n $PLISTBUDDY -c \"Delete :PreferenceSpecifiers:$i:Platform\" \"$ROOT_PLIST\"\n else\n echo \"Found entry $i for $platform, removing entry\"\n $PLISTBUDDY -c \"Delete :PreferenceSpecifiers:$i\" \"$ROOT_PLIST\"\n ((COUNT--))\n ((i--))\n fi\n fi\ndone\n";
showEnvVarsInLog = 0;
};
CE59A7B22ABCCB7C00E5FFBD /* Patch Settings bundle */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"$(SRCROOT)/Platform/iOS/Settings.bundle",
);
name = "Patch Settings bundle";
outputFileListPaths = (
);
outputPaths = (
"$(TARGET_BUILD_DIR)/$(CONTENTS_FOLDER_PATH)/Settings.bundle/Root.plist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "#!/bin/sh\n\nPLISTBUDDY=/usr/libexec/PlistBuddy\nROOT_PLIST=\"$SCRIPT_OUTPUT_FILE_0\"\n\nCOUNT=$($PLISTBUDDY -c \"Print :PreferenceSpecifiers\" \"$ROOT_PLIST\" | grep -c '^ }$')\n\nfor ((i = 0; i < COUNT; i++)); do\n platform=$($PLISTBUDDY -c \"Print :PreferenceSpecifiers:$i:Platform\" \"$ROOT_PLIST\" 2> /dev/null)\n if [ ! -z \"$platform\" ]; then\n if [ \"$platform\" == \"$PLATFORM_FAMILY_NAME\" ]; then\n echo \"Found entry $i for $platform\"\n $PLISTBUDDY -c \"Delete :PreferenceSpecifiers:$i:Platform\" \"$ROOT_PLIST\"\n else\n echo \"Found entry $i for $platform, removing entry\"\n $PLISTBUDDY -c \"Delete :PreferenceSpecifiers:$i\" \"$ROOT_PLIST\"\n ((COUNT--))\n ((i--))\n fi\n fi\ndone\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
8401FD5E269BE9C500265F0D /* Sources */ = {
isa = PBXSourcesBuildPhase;