From c4e145e50cc6b015a5238b8775cc43c7c914cd79 Mon Sep 17 00:00:00 2001 From: Jared Marsau Date: Wed, 13 Mar 2024 13:32:44 -0700 Subject: [PATCH] Adding visionOS support Updated build script along with each plug-in for visionOS support. This includes the ability to build for Vision Pro as well as the Vision Simulator. --- build.py | 30 ++- .../ProjectSettings/EditorBuildSettings.asset | 6 +- .../Accessibility.xcodeproj/project.pbxproj | 65 ++++- .../xcschemes/visionOS - Debug.xcscheme | 57 +++++ .../xcschemes/visionOS - Release.xcscheme | 57 +++++ .../Assets/Apple.Core/CHANGELOG.md | 4 + .../Assets/Apple.Core/Editor/AppleBuild.cs | 66 +---- .../Apple.Core/Editor/AppleBuildProfile.cs | 5 +- .../Editor/AppleBuildProfileEditor.cs | 26 +- .../Editor/AppleBuildSettingsProvider.cs | 4 +- .../Apple.Core/Editor/AppleBuildStep.cs | 6 +- .../Apple.Core/Editor/AppleCoreBuildStep.cs | 6 +- .../Apple.Core/Editor/AppleNativeLibrary.cs | 4 +- .../Editor/ApplePlugInEnvironment.cs | 32 ++- .../Editor/AppleSecurityBuildStep.cs | 6 +- .../Apple.Core/Editor/AppleUnityPackage.cs | 4 +- .../Editor/AppleUserManagementBuildStep.cs | 4 +- .../Apple.Core/Editor/CodsignCommand.cs | 4 +- .../Apple.Core/Editor/KeychainCommand.cs | 4 +- .../Apple.Core/Editor/ProductBuildCommand.cs | 4 +- .../Apple.Core/Editor/ProductSignCommand.cs | 4 +- .../Apple.Core/Editor/ShellCommandRunner.cs | 4 +- .../Apple.Core/Editor/XcodeBuildCommand.cs | 4 +- .../Assets/Apple.Core/Editor/XcrunCommand.cs | 4 +- .../Apple.Core/Runtime/Apple.Core.asmdef | 4 +- .../Runtime/AvailabilityAttributes.cs | 10 +- .../Apple.Core/Runtime/InteropUtility.cs | 2 +- .../Apple.Core/Runtime/RuntimeEnvironment.cs | 1 + .../Assets/Apple.Core/package.json | 2 +- .../ProjectSettings/ProjectSettings.asset | 3 +- .../AppleCoreNative.xcodeproj/project.pbxproj | 182 +++++++++++++- .../xcschemes/visionOS - Debug.xcscheme | 75 ++++++ .../xcschemes/visionOS - Release.xcscheme | 84 +++++++ .../Native/AppleCoreNative/AppleCoreNative.h | 2 +- .../AppleCore_BridgingHeader.h | 1 + .../AppleCoreNative/CoreUtilities.swift | 4 +- .../Assets/Apple.CoreHaptics/CHANGELOG.md | 4 + .../Apple.CoreHaptics/Editor/CHBuildStep.cs | 8 +- .../Source/Misc/InteropUtility.cs | 2 +- .../Assets/Apple.CoreHaptics/package.json | 4 +- .../ProjectSettings/ProjectSettings.asset | 2 +- .../project.pbxproj | 193 ++++++++++++++- .../xcschemes/visionOS - Debug.xcscheme | 75 ++++++ .../xcschemes/visionOS - Release.xcscheme | 84 +++++++ .../CoreHapticsWrapper/CoreHapticsWrapper.h | 2 +- .../Assets/Apple.GameController/CHANGELOG.md | 4 + .../Editor/AppleGameControllerBuildStep.cs | 10 +- .../Source/InteropUtility.cs | 2 +- .../Assets/Apple.GameController/package.json | 4 +- .../ProjectSettings/ProjectSettings.asset | 2 +- .../project.pbxproj | 157 +++++++++++- .../xcschemes/visionOS - Debug.xcscheme | 84 +++++++ .../xcschemes/visionOS - Release.xcscheme | 75 ++++++ .../GameControllerWrapper.h | 2 +- .../Assets/Apple.GameKit/CHANGELOG.md | 4 + .../Apple.Arcade.GameKit.Sample.asmdef | 3 +- .../Editor/AppleGameKitBuildStep.cs | 6 +- .../Apple.GameKit/Source/Apple.GameKit.asmdef | 3 +- .../Apple.GameKit/Source/InteropUtility.cs | 2 +- .../Assets/Apple.GameKit/package.json | 4 +- .../ProjectSettings/ProjectSettings.asset | 2 +- .../GameKitWrapper.xcodeproj/project.pbxproj | 227 +++++++++++++++++- .../xcschemes/visionOS - Debug.xcscheme | 84 +++++++ .../xcschemes/visionOS - Release.xcscheme | 84 +++++++ .../Native/GameKitWrapper/AccessPoint.swift | 7 +- .../Native/GameKitWrapper/GKAchievement.swift | 13 +- .../GKGameCenterViewController.swift | 3 +- .../Native/GameKitWrapper/GKLocalPlayer.swift | 4 +- .../Native/GameKitWrapper/GKMatch.swift | 6 +- .../GameKitWrapper/GKMatchRequest.swift | 14 +- .../Native/GameKitWrapper/GKMatchedPlayers.m | 21 +- .../Native/GameKitWrapper/GKMatchmaker.swift | 4 +- .../GKMatchmakerViewController.swift | 6 +- .../GKTurnBasedMatchmakerViewController.swift | 7 +- .../GameKitUIDelegateHandler.swift | 3 +- .../Native/GameKitWrapper/GameKitWrapper.h | 3 +- .../Apple.PHASE_Unity/Assets/CHANGELOG.md | 4 + .../Assets/Editor/PHASEBuildStep.cs | 12 +- .../Assets/Runtime/Apple.PHASE.asmdef | 3 +- .../Assets/Runtime/PHASEHelpers.cs | 6 +- .../Apple.PHASE_Unity/Assets/package.json | 4 +- .../ProjectSettings/ProjectSettings.asset | 2 +- .../project.pbxproj | 178 +++++++++++++- .../xcschemes/visionOS - Debug.xcscheme | 84 +++++++ .../xcschemes/visionOS - Release.xcscheme | 84 +++++++ scripts/python/upi_build_context.py | 6 +- scripts/python/upi_cli_argument_options.py | 2 + scripts/python/upi_toolchain.py | 11 + .../python/upi_unity_native_plugin_manager.py | 4 +- scripts/shell/copy_native_libraries.sh | 4 + 90 files changed, 2145 insertions(+), 263 deletions(-) create mode 100644 plug-ins/Apple.Accessibility/Native/Accessibility.xcodeproj/xcshareddata/xcschemes/visionOS - Debug.xcscheme create mode 100644 plug-ins/Apple.Accessibility/Native/Accessibility.xcodeproj/xcshareddata/xcschemes/visionOS - Release.xcscheme create mode 100644 plug-ins/Apple.Core/Native/AppleCoreNative.xcodeproj/xcshareddata/xcschemes/visionOS - Debug.xcscheme create mode 100644 plug-ins/Apple.Core/Native/AppleCoreNative.xcodeproj/xcshareddata/xcschemes/visionOS - Release.xcscheme create mode 100644 plug-ins/Apple.CoreHaptics/Native/CoreHapticsWrapper.xcodeproj/xcshareddata/xcschemes/visionOS - Debug.xcscheme create mode 100644 plug-ins/Apple.CoreHaptics/Native/CoreHapticsWrapper.xcodeproj/xcshareddata/xcschemes/visionOS - Release.xcscheme create mode 100644 plug-ins/Apple.GameController/Native/GameControllerWrapper.xcodeproj/xcshareddata/xcschemes/visionOS - Debug.xcscheme create mode 100644 plug-ins/Apple.GameController/Native/GameControllerWrapper.xcodeproj/xcshareddata/xcschemes/visionOS - Release.xcscheme create mode 100644 plug-ins/Apple.GameKit/Native/GameKitWrapper.xcodeproj/xcshareddata/xcschemes/visionOS - Debug.xcscheme create mode 100644 plug-ins/Apple.GameKit/Native/GameKitWrapper.xcodeproj/xcshareddata/xcschemes/visionOS - Release.xcscheme create mode 100644 plug-ins/Apple.PHASE/Native/AudioPluginPHASE.xcodeproj/xcshareddata/xcschemes/visionOS - Debug.xcscheme create mode 100644 plug-ins/Apple.PHASE/Native/AudioPluginPHASE.xcodeproj/xcshareddata/xcschemes/visionOS - Release.xcscheme diff --git a/build.py b/build.py index 1bb77969..b97a0b32 100755 --- a/build.py +++ b/build.py @@ -71,12 +71,12 @@ argument_parser = argparse.ArgumentParser(description="Builds all native libraries, packages plug-ins, and moves packages to build folder.") argument_parser.add_argument("-p", "--plugin-list", dest="plugin_list", nargs='*', default=[PluginID.ALL], help=f"Selects the plug-ins to process. Possible values are: {PluginID.ACCESSIBILITY}, {PluginID.CORE}, {PluginID.CORE_HAPTICS}, {PluginID.GAME_CONTROLLER}, {PluginID.GAME_KIT}, {PluginID.PHASE}, or {PluginID.ALL}. Default is: {PluginID.ALL}") -argument_parser.add_argument("-m", "--platforms", dest="platform_list", nargs='*', default=[PlatformID.ALL], help=f"Selects the desired platforms to target when building native libraries. Possible values are: {PlatformID.IOS}, {PlatformID.IOS_SIMULATOR}, {PlatformID.MACOS}, {PlatformID.TVOS}, {PlatformID.TVOS_SIMULATOR}, {PlatformID.SIMULATORS}, {PlatformID.DEVICES} or {PlatformID.ALL}. Default is: {PlatformID.ALL}") +argument_parser.add_argument("-m", "--platforms", dest="platform_list", nargs='*', default=[PlatformID.ALL], help=f"Selects the desired platforms to target when building native libraries. Possible values are: {PlatformID.IOS}, {PlatformID.IOS_SIMULATOR}, {PlatformID.MACOS}, {PlatformID.TVOS}, {PlatformID.TVOS_SIMULATOR}, {PlatformID.VISIONOS}, {PlatformID.VISIONOS_SIMULATOR}, {PlatformID.SIMULATORS}, {PlatformID.DEVICES} or {PlatformID.ALL}. Default is: {PlatformID.ALL}") argument_parser.add_argument("-b", "--build-action", dest="build_actions", nargs='*', default=[BuildActionID.BUILD, BuildActionID.PACK], help=f"Sets the build actions for the selected plug-ins. Possible values are: {BuildActionID.BUILD}, {BuildActionID.PACK}, {BuildActionID.NONE} or {BuildActionID.ALL}. Defaults are: {BuildActionID.BUILD}, {BuildActionID.PACK}") argument_parser.add_argument("-bc","--build-config", dest="build_config", default=ConfigID.ALL, help=f"Sets the build configuration to compile. Possible values are: {ConfigID.RELEASE}, {ConfigID.DEBUG}, or {ConfigID.ALL} which builds all other configs. Default is: {ConfigID.ALL}") argument_parser.add_argument("-c", "--codesign-identity", dest="codesign_identity", default=str(), help=f"String which uniquely identifies your codesign identity, typically represented by a hash. Only applied if build actions include {BuildActionID.BUILD}") argument_parser.add_argument("-sc", "--skip-codesign", dest="skip_codesign", action="store_true", help=f"Skips codesign and all user prompts.") -argument_parser.add_argument("-u", "--unity-installation-root", dest="unity_installation_root", default="/Applications/Unity", help="Root path to search for Unity installations when building tests. Note: performs a full recursive search of the given directory.") +argument_parser.add_argument("-u", "--unity-installation-root", dest="unity_installation_root", default="", help="Root path to search for Unity installations when building tests. Note: performs a full recursive search of the given directory.") argument_parser.add_argument("-o", "--output-path", dest="output_path", default=CTX.build_output_path, help=f"Build result path for final packages. Default: {CTX.build_output_path}") argument_parser.add_argument("-k", "--clean-action", dest="clean_actions", nargs='*', default=[CleanActionID.NONE], help=f"Sets the clean actions for the selected plug-ins. Possible values are: {CleanActionID.NATIVE}, {CleanActionID.PACKAGES}, {CleanActionID.TESTS}, {CleanActionID.NONE}, or {CleanActionID.ALL}. Defaults to no clean action.") argument_parser.add_argument("-f", "--force", dest="force_clean", action="store_true", help="Setting this option will not prompt user on file deletion during clean operations.") @@ -110,16 +110,18 @@ def Main(): CTX.printer.SectionHeading("Command Line Option Summary") print(f"\n Build Actions({Printer.Bold('-b')}): {CTX.printer.Context(' '.join(build_args.build_actions))}" - f"\n Selected Platforms({Printer.Bold('-m')}): {CTX.printer.Context(' '.join(filtered_user_platforms))} [Build System Support: {Printer.MultiDecorate(', '.join(supported_platforms), prompt_theme.info_bg_color, prompt_theme.info_color)}]" + f"\n Selected Platforms({Printer.Bold('-m')}): {CTX.printer.Context(' '.join(filtered_user_platforms))} (Build System Support: {Printer.MultiDecorate(', '.join(supported_platforms), prompt_theme.info_bg_color, prompt_theme.info_color)})" f"\n Build Config({Printer.Bold('-bc')}): {CTX.printer.Context(build_args.build_config)}" f"\n Package Output Path({Printer.Bold('-o')}): {CTX.printer.Context(build_args.output_path)}" f"\n Selected Plug-Ins({Printer.Bold('-p')}): {CTX.printer.Context(' '.join(build_args.plugin_list))}" f"\n Clean Actions({Printer.Bold('-k')}): {CTX.printer.Context(' '.join(build_args.clean_actions))}" f"\n Force Clean({Printer.Bold('-f')}): {CTX.printer.Context('Yes (-f set)' if build_args.force_clean else 'No (-f not set)')}" - f"\n Unity Installation Root({Printer.Bold('-u')}): {CTX.printer.Context(build_args.unity_installation_root)}" f"\n Build Tests({Printer.Bold('-t')}): {CTX.printer.Context('Yes (-t set)' if build_args.build_tests else 'No (-t not set)')}" f"\n Skip Codesign({Printer.Bold('-sc')}): {CTX.printer.Context('Yes (-sc set)' if build_args.skip_codesign else 'No (-sc not set)')}") + if len(build_args.unity_installation_root) > 0: + print(f" Unity Installation Root({Printer.Bold('-u')}): {CTX.printer.Context(build_args.unity_installation_root)}") + if not build_args.skip_codesign: print(f" Codesigning Identity({Printer.Bold('-c')}): {CTX.printer.Context(build_args.codesign_identity if len(build_args.codesign_identity) > 0 else 'None supplied.')}") @@ -165,16 +167,21 @@ def Main(): PlatformID.IOS_SIMULATOR: False, PlatformID.TVOS: False, PlatformID.TVOS_SIMULATOR : False, - PlatformID.MACOS: False + PlatformID.MACOS: False, + PlatformID.VISIONOS: False, + PlatformID.VISIONOS_SIMULATOR: False } valid_platform_found = False for platform_id in filtered_user_platforms: if platform_id == PlatformID.ALL: + CTX.printer.Message(f"Platform '{PlatformID.ALL}' selected to build for all supported platforms and overrides all other platform ({Printer.Bold('-m')}) arguments.") + CTX.printer.InfoMessage(f"Unity lacks full support for {PlatformID.IOS_SIMULATOR} and {PlatformID.TVOS_SIMULATOR}; these platforms are skipped unless explicitly set as platform ({Printer.Bold('-m')}) arguments.") valid_platform_found = True - for selected_platform_key in CTX.platforms.keys(): + for selected_platform_key in CTX.platforms: if selected_platform_key in supported_platforms: - CTX.platforms[selected_platform_key] = True + if selected_platform_key != PlatformID.IOS_SIMULATOR and selected_platform_key != PlatformID.TVOS_SIMULATOR: + CTX.platforms[selected_platform_key] = True break elif platform_id in CTX.platforms: if platform_id in supported_platforms: @@ -185,13 +192,14 @@ def Main(): if not utility.BooleanPrompt(CTX.printer, f"Would you like to continue building without {platform_id} support?"): exit() else: - CTX.printer.WarningMessage(f"Ignoring unknown platform '{platform_id}'. Valid options are {PlatformID.IOS}, {PlatformID.IOS_SIMULATOR}, {PlatformID.MACOS}, {PlatformID.TVOS}, {PlatformID.TVOS_SIMULATOR}, {PlatformID.SIMULATORS}, {PlatformID.DEVICES}, or {PlatformID.ALL} (default).") + CTX.printer.WarningMessage(f"Ignoring unknown platform '{platform_id}'. Valid options are {PlatformID.IOS}, {PlatformID.IOS_SIMULATOR}, {PlatformID.MACOS}, {PlatformID.TVOS}, {PlatformID.TVOS_SIMULATOR}, {PlatformID.VISIONOS}, {PlatformID.VISIONOS_SIMULATOR}, {PlatformID.SIMULATORS}, {PlatformID.DEVICES}, or {PlatformID.ALL} (default).") if not valid_platform_found: CTX.printer.WarningMessage(f"No valid platform passed to build script. Using default argument: {PlatformID.ALL}") - for selected_platform_key in CTX.platforms.keys(): - if platform_id in supported_platforms: - CTX.platforms[selected_platform_key] = True + for selected_platform_key in CTX.platforms: + if selected_platform_key in supported_platforms: + if selected_platform_key != PlatformID.IOS_SIMULATOR and selected_platform_key != PlatformID.TVOS_SIMULATOR: + CTX.platforms[selected_platform_key] = True if not CTX.platforms[PlatformID.MACOS]: CTX.printer.WarningMessage(f"User selected to skip building for {PlatformID.MACOS}. Play mode (the play button) in the Unity Editor will not be supported by the plug-ins.") diff --git a/plug-ins/Apple.Accessibility/Apple.Accessibility_Unity/ProjectSettings/EditorBuildSettings.asset b/plug-ins/Apple.Accessibility/Apple.Accessibility_Unity/ProjectSettings/EditorBuildSettings.asset index 00d12e5a..9b9accaf 100644 --- a/plug-ins/Apple.Accessibility/Apple.Accessibility_Unity/ProjectSettings/EditorBuildSettings.asset +++ b/plug-ins/Apple.Accessibility/Apple.Accessibility_Unity/ProjectSettings/EditorBuildSettings.asset @@ -5,6 +5,9 @@ EditorBuildSettings: m_ObjectHideFlags: 0 serializedVersion: 2 m_Scenes: + - enabled: 1 + path: Assets/Apple.Accessibility/Demos/Scenes/MainMenu.unity + guid: 9569bb35777744e39be6b23a14eb7797 - enabled: 1 path: Assets/Apple.Accessibility/Demos/Scenes/3D Objects.unity guid: a8f80b6a67e07497a82aecd6bbf8b08d @@ -20,9 +23,6 @@ EditorBuildSettings: - enabled: 1 path: Assets/Apple.Accessibility/Demos/Scenes/Custom Action.unity guid: c13af241370b14d439c4af6c86e92167 - - enabled: 1 - path: Assets/Apple.Accessibility/Demos/Scenes/MainMenu.unity - guid: 9569bb35777744e39be6b23a14eb7797 - enabled: 1 path: Assets/Apple.Accessibility/Demos/Scenes/Modal.unity guid: e71b36d695eda474cbd255dc95a75c83 diff --git a/plug-ins/Apple.Accessibility/Native/Accessibility.xcodeproj/project.pbxproj b/plug-ins/Apple.Accessibility/Native/Accessibility.xcodeproj/project.pbxproj index eda0add0..19b50a41 100644 --- a/plug-ins/Apple.Accessibility/Native/Accessibility.xcodeproj/project.pbxproj +++ b/plug-ins/Apple.Accessibility/Native/Accessibility.xcodeproj/project.pbxproj @@ -11,13 +11,24 @@ isa = PBXAggregateTarget; buildConfigurationList = 241B6AAB2947AC5500EC7B7A /* Build configuration list for PBXAggregateTarget "macOS_sentinel" */; buildPhases = ( - 241B6AAC2947ACF700EC7B7A /* macOS Unsupported Message */, + 241B6AAC2947ACF700EC7B7A /* ShellScript */, ); dependencies = ( ); name = macOS_sentinel; productName = macOS_sentinel; }; + 24B064172B7EEEC7007ABBB8 /* visionOS_sentinel */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 24B064192B7EEEC7007ABBB8 /* Build configuration list for PBXAggregateTarget "visionOS_sentinel" */; + buildPhases = ( + 24B064182B7EEEC7007ABBB8 /* ShellScript */, + ); + dependencies = ( + ); + name = visionOS_sentinel; + productName = macOS_sentinel; + }; /* End PBXAggregateTarget section */ /* Begin PBXBuildFile section */ @@ -240,6 +251,7 @@ C9729D39274324FC009BB169 /* AppleAccessibility_iOS */, C9729E1127434953009BB169 /* AppleAccessibility_tvOS */, 241B6AA82947AC5500EC7B7A /* macOS_sentinel */, + 24B064172B7EEEC7007ABBB8 /* visionOS_sentinel */, ); }; /* End PBXProject section */ @@ -262,7 +274,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 241B6AAC2947ACF700EC7B7A /* macOS Unsupported Message */ = { + 241B6AAC2947ACF700EC7B7A /* ShellScript */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; buildActionMask = 2147483647; @@ -272,7 +284,6 @@ ); inputPaths = ( ); - name = "macOS Unsupported Message"; outputFileListPaths = ( ); outputPaths = ( @@ -282,6 +293,25 @@ shellScript = "# Type a script or drag a script file from your workspace to insert its path.\necho \"\\n[Accessibility] macOS not currently supported by Accessibility plug-in. No native library built.\"\n"; showEnvVarsInLog = 0; }; + 24B064182B7EEEC7007ABBB8 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "# Type a script or drag a script file from your workspace to insert its path.\necho \"\\n[Accessibility] visionOS not currently supported by Accessibility plug-in. No native library built.\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -334,6 +364,26 @@ }; name = Release; }; + 24B0641A2B7EEEC7007ABBB8 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 240646122B61FC3C00246067 /* Accessibility.xcconfig */; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = xros; + }; + name = Debug; + }; + 24B0641B2B7EEEC7007ABBB8 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 240646122B61FC3C00246067 /* Accessibility.xcconfig */; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = xros; + }; + name = Release; + }; 93BB76BD25CB3A4600CF60ED /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 240646122B61FC3C00246067 /* Accessibility.xcconfig */; @@ -556,6 +606,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 24B064192B7EEEC7007ABBB8 /* Build configuration list for PBXAggregateTarget "visionOS_sentinel" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 24B0641A2B7EEEC7007ABBB8 /* Debug */, + 24B0641B2B7EEEC7007ABBB8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 93BB76B125CB3A4600CF60ED /* Build configuration list for PBXProject "Accessibility" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/plug-ins/Apple.Accessibility/Native/Accessibility.xcodeproj/xcshareddata/xcschemes/visionOS - Debug.xcscheme b/plug-ins/Apple.Accessibility/Native/Accessibility.xcodeproj/xcshareddata/xcschemes/visionOS - Debug.xcscheme new file mode 100644 index 00000000..5ad77d03 --- /dev/null +++ b/plug-ins/Apple.Accessibility/Native/Accessibility.xcodeproj/xcshareddata/xcschemes/visionOS - Debug.xcscheme @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/plug-ins/Apple.Accessibility/Native/Accessibility.xcodeproj/xcshareddata/xcschemes/visionOS - Release.xcscheme b/plug-ins/Apple.Accessibility/Native/Accessibility.xcodeproj/xcshareddata/xcschemes/visionOS - Release.xcscheme new file mode 100644 index 00000000..63fc35b8 --- /dev/null +++ b/plug-ins/Apple.Accessibility/Native/Accessibility.xcodeproj/xcshareddata/xcschemes/visionOS - Release.xcscheme @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/CHANGELOG.md b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/CHANGELOG.md index 32bc37ca..993711cf 100644 --- a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/CHANGELOG.md +++ b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/CHANGELOG.md @@ -1,6 +1,10 @@ # CHANGELOG All notable changes to this project will be documented in this file. +## [3.1.0] - 2024-2-23 +### Added +Support for visionOS + ## [3.0.0] - 2024-2-15 ### Added - Support for iPhone simulator and AppleTV Simulator diff --git a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleBuild.cs b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleBuild.cs index 8dee5fd8..f416a8d8 100644 --- a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleBuild.cs +++ b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleBuild.cs @@ -1,4 +1,4 @@ -#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) using UnityEditor; using UnityEditor.Build; using UnityEditor.Build.Reporting; @@ -16,7 +16,6 @@ public static class AppleBuild // Helper for logging during development. private static void LogDevelopmentMessage(string methodName, string message) { - // TODO: Expose as Editor project setting #if DEVELOPMENT_LOGGING_ENABLED Debug.Log($"[AppleBuild.{methodName}] {message}"); #endif @@ -35,7 +34,7 @@ public static void OnPostProcessBuild(BuildTarget buildTarget, string generatedP LogDevelopmentMessage("OnPostProcessBuild", "OnBeginPostProcess begin"); LogDevelopmentMessage("OnPostProcessBuild", $"Found {appleBuildProfile.buildSteps.Count} build steps."); - LogDevelopmentMessage("OnPostProcessBuild", $"Outputting to project at path {generatedProjectPath}."); + LogDevelopmentMessage("OnPostProcessBuild", $"Outputting to project at path {generatedProjectPath}"); var processedBuildSteps = new Dictionary(); foreach (var buildStep in appleBuildProfile.buildSteps) @@ -84,6 +83,10 @@ public static void OnPostProcessBuild(BuildTarget buildTarget, string generatedP minOSVersionString = appleBuildProfile.MinimumOSVersion_macOS; break; + case BuildTarget.VisionOS: + minOSVersionString = appleBuildProfile.MinimumOSVersion_visionOS; + break; + default: break; } @@ -309,54 +312,6 @@ public static string GetEntitlementsPath(BuildTarget buildTarget, string pathToB } } - /// - /// Unity generates an Xcode project and uses this string for the names of the generated project file, scheme, and Xcode build target. - /// - /// The Unity build target - /// The string used by Unity for Xcode naming. - public static string GetXcodeUtilityIdentifier(BuildTarget buildTarget) - { - switch(buildTarget) - { - case BuildTarget.StandaloneOSX: - return Application.productName; - case BuildTarget.iOS: - case BuildTarget.tvOS: - return "Unity-iPhone"; - default: - return string.Empty; - } - } - - /// - /// Returns the Xcode scheme name for a given BuildTarget - /// - public static string GetXcodeSchemeName(BuildTarget buildTarget) - { - return GetXcodeUtilityIdentifier(buildTarget); - } - - /// - /// Utility method for getting the .xcodeproj path for a built project - /// - public static string GetXcodeProjectPath(BuildTarget buildTarget, string pathToBuiltProject) - { - switch (buildTarget) - { - case BuildTarget.iOS: - case BuildTarget.tvOS: - return $"{pathToBuiltProject}/Unity-iPhone.xcodeproj"; - case BuildTarget.StandaloneOSX: -#if UNITY_2020_1_OR_NEWER - return $"{pathToBuiltProject}/{new DirectoryInfo(pathToBuiltProject).Name}.xcodeproj"; -#else - return pathToBuiltProject; -#endif - default: - return null; - } - } - /// /// Utility method for getting the .pbxproj path for a built project /// @@ -366,10 +321,12 @@ public static string GetPbxProjectPath(BuildTarget buildTarget, string pathToBui { case BuildTarget.iOS: case BuildTarget.tvOS: - return PBXProject.GetPBXProjectPath(pathToBuiltProject); + return $"{pathToBuiltProject}/Unity-iPhone.xcodeproj/project.pbxproj"; + case BuildTarget.VisionOS: + return $"{pathToBuiltProject}/Unity-VisionOS.xcodeproj/project.pbxproj"; case BuildTarget.StandaloneOSX: #if UNITY_2020_1_OR_NEWER - return $"{GetXcodeProjectPath(buildTarget, pathToBuiltProject)}/project.pbxproj"; + return $"{pathToBuiltProject}/{new DirectoryInfo(pathToBuiltProject).Name}.xcodeproj/project.pbxproj"; #else return $"{pathToBuiltProject}/project.pbxproj"; #endif @@ -388,7 +345,6 @@ public static PBXProject GetPbxProject(BuildTarget buildTarget, string pathToBui return null; } - // Load the project... var proj = new PBXProject(); proj.ReadFromFile(GetPbxProjectPath(buildTarget, pathToBuiltProject)); @@ -515,4 +471,4 @@ private static string GenerateEmbedNativeLibraryShellScript(string projectRelati } } } -#endif // (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#endif // (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) diff --git a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleBuildProfile.cs b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleBuildProfile.cs index ded53e5e..68bcd60b 100644 --- a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleBuildProfile.cs +++ b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleBuildProfile.cs @@ -1,4 +1,4 @@ -#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) using System; using System.IO; using System.Linq; @@ -27,6 +27,7 @@ public class AppleBuildProfile : ScriptableObject public string MinimumOSVersion_iOS = string.Empty; public string MinimumOSVersion_tvOS = string.Empty; public string MinimumOSVersion_macOS = string.Empty; + public string MinimumOSVersion_visionOS = string.Empty; public bool AppUsesNonExemptEncryption = false; @@ -110,4 +111,4 @@ public void ResolveBuildSteps() } } } -#endif // (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#endif // (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) diff --git a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleBuildProfileEditor.cs b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleBuildProfileEditor.cs index c8a001b7..aef4ad7e 100644 --- a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleBuildProfileEditor.cs +++ b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleBuildProfileEditor.cs @@ -1,4 +1,4 @@ -#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) using System; using System.Collections.Generic; using System.Linq; @@ -21,6 +21,7 @@ public class AppleBuildProfileEditor : Editor private SerializedProperty _serializedMinimumOSVersion_iOS; private SerializedProperty _serializedMinimumOSVersion_tvOS; private SerializedProperty _serializedMinimumOSVersion_macOS; + private SerializedProperty _serializedMinimumOSVersion_visionOS; private SerializedProperty _serializedAutomateEntitlements; private SerializedProperty _serializedDefaultEntitlements; @@ -49,6 +50,7 @@ class UIStrings public const string MinimumOSVersionFieldLabelText_iOS = "Minimum iOS Version"; public const string MinimumOSVersionFieldLabelText_tvOS = "Minimum tvOS Version"; public const string MinimumOSVersionFieldLabelText_macOS = "Minimum macOS Version"; + public const string MinimumOSVersionFieldLabelText_visionOS = "Minimum visionOS Version"; public const string AutomateEntitlementsToggleLabelText = "Automate Entitlements"; public const string AutomateEntitlementsTooltip = "Automatically add an entitlements file to your Xcode project."; @@ -57,10 +59,9 @@ class UIStrings public const string DefaultEntitlementsTooltip = "(Optional) An Entitlements file to incorporate into your Xcode app."; public const string iOSBuildTargetName = "iOS"; - public const string tvOSBuildTargetName = "tvOS"; - public const string macOSBuildTargetName = "macOS"; + public const string visionOSBuildTargetName = "visionOS"; } public void OnEnable() @@ -71,8 +72,9 @@ public void OnEnable() _serializedNonExemptEncryption = serializedObject.FindProperty("AppUsesNonExemptEncryption"); _serializedMinimumOSVersion_iOS = serializedObject.FindProperty("MinimumOSVersion_iOS"); - _serializedMinimumOSVersion_macOS = serializedObject.FindProperty("MinimumOSVersion_macOS"); _serializedMinimumOSVersion_tvOS = serializedObject.FindProperty("MinimumOSVersion_tvOS"); + _serializedMinimumOSVersion_macOS = serializedObject.FindProperty("MinimumOSVersion_macOS"); + _serializedMinimumOSVersion_visionOS = serializedObject.FindProperty("MinimumOSVersion_visionOS"); _serializedAutomateEntitlements = serializedObject.FindProperty("AutomateEntitlements"); _serializedDefaultEntitlements = serializedObject.FindProperty("DefaultEntitlements"); @@ -131,6 +133,12 @@ public override void OnInspectorGUI() serializedObject.ApplyModifiedProperties(); } + if (_serializedMinimumOSVersion_visionOS.stringValue == string.Empty) + { + _serializedMinimumOSVersion_visionOS.stringValue = PlayerSettings.VisionOS.targetOSVersionString; + serializedObject.ApplyModifiedProperties(); + } + GUILayout.Label($"{UIStrings.UnityActiveBuildTargetLabelText} {buildTargetName}"); if (GUILayout.Button(UIStrings.UnityBuildSettingsButtonLabelText)) @@ -197,6 +205,14 @@ public override void OnInspectorGUI() PlayerSettings.tvOS.targetOSVersionString = _serializedMinimumOSVersion_tvOS.stringValue; } + var minimumOSVersionLabel_visionOS = new GUIContent(UIStrings.MinimumOSVersionFieldLabelText_visionOS); + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(_serializedMinimumOSVersion_visionOS, minimumOSVersionLabel_visionOS, GUILayout.MinWidth(_minLabelWidth)); + if (EditorGUI.EndChangeCheck() && _serializedMinimumOSVersion_visionOS.stringValue != string.Empty) + { + PlayerSettings.VisionOS.targetOSVersionString = _serializedMinimumOSVersion_visionOS.stringValue; + } + var minimumOSVersionLabel_macOS = new GUIContent(UIStrings.MinimumOSVersionFieldLabelText_macOS); EditorGUILayout.PropertyField(_serializedMinimumOSVersion_macOS, minimumOSVersionLabel_macOS, GUILayout.MinWidth(_minLabelWidth)); } @@ -297,4 +313,4 @@ public override void OnInspectorGUI() } } } -#endif // (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#endif // (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) diff --git a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleBuildSettingsProvider.cs b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleBuildSettingsProvider.cs index 9ce45a60..9d9de7d1 100644 --- a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleBuildSettingsProvider.cs +++ b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleBuildSettingsProvider.cs @@ -1,4 +1,4 @@ -#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) using System; using System.Collections.Generic; using System.IO; @@ -57,4 +57,4 @@ public static SettingsProvider Create() } } } -#endif // (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#endif // (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) diff --git a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleBuildStep.cs b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleBuildStep.cs index 030eccab..e8e2de13 100644 --- a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleBuildStep.cs +++ b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleBuildStep.cs @@ -5,7 +5,7 @@ using UnityEditor; using UnityEngine; -#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) using UnityEditor.iOS.Xcode; #endif @@ -40,7 +40,7 @@ where typeof(AppleBuildStep).IsAssignableFrom(type) && type != typeof(AppleBuild return appleBuildStepTypes; } -#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) /// /// Called at the beginning of performing build post process. This is invoked first for all steps. /// @@ -91,6 +91,6 @@ public virtual void OnProcessExportPlistOptions(AppleBuildProfile appleBuildProf /// /// public virtual void OnFinalizePostProcess(AppleBuildProfile appleBuildProfile, BuildTarget buildTarget, string generatedProjectPath) { } -#endif // (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#endif // (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) } } diff --git a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleCoreBuildStep.cs b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleCoreBuildStep.cs index 09006825..5024062c 100644 --- a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleCoreBuildStep.cs +++ b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleCoreBuildStep.cs @@ -3,7 +3,7 @@ using UnityEngine; using UnityEditor; -#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) using UnityEditor.iOS.Xcode; #endif @@ -12,9 +12,9 @@ namespace Apple.Core public class AppleCoreBuildStep : AppleBuildStep { public override string DisplayName => "Apple.Core"; - public override BuildTarget[] SupportedTargets => new BuildTarget[] {BuildTarget.iOS, BuildTarget.tvOS, BuildTarget.StandaloneOSX}; + public override BuildTarget[] SupportedTargets => new BuildTarget[] {BuildTarget.iOS, BuildTarget.tvOS, BuildTarget.StandaloneOSX, BuildTarget.VisionOS}; -#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) public override void OnFinalizePostProcess(AppleBuildProfile appleBuildProfile, BuildTarget buildTarget, string generatedProjectPath) { var pbxProject = AppleBuild.GetPbxProject(buildTarget, generatedProjectPath); diff --git a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleNativeLibrary.cs b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleNativeLibrary.cs index 8ed1c5ba..b1dd1923 100644 --- a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleNativeLibrary.cs +++ b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleNativeLibrary.cs @@ -1,4 +1,4 @@ -#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) using System; using System.IO; using UnityEngine; @@ -119,4 +119,4 @@ public AppleNativeLibrary(string fileName, string debugSymbolsFileName, string a public bool IsValid => ((FileName != string.Empty) && (Platform != string.Empty) && (Path != string.Empty)) && (Directory.Exists(FullPath) || File.Exists(FullPath)); } } -#endif // (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#endif // (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) diff --git a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/ApplePlugInEnvironment.cs b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/ApplePlugInEnvironment.cs index 3b07d99d..0551db12 100644 --- a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/ApplePlugInEnvironment.cs +++ b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/ApplePlugInEnvironment.cs @@ -1,4 +1,4 @@ -#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) using System; using System.IO; using System.Linq; @@ -24,15 +24,17 @@ public static class ApplePlatformID public static string iOS => "iOS"; public static string macOS => "macOS"; public static string tvOS => "tvOS"; + public static string visionOS => "visionOS"; public static string iPhoneSimulator => "iPhoneSimulator"; public static string AppleTVSimulator => "AppleTVSimulator"; + public static string VisionSimulator => "VisionSimulator"; public static string Unknown => "Unknown"; public static string[] ValidPlatforms { get; private set; } static ApplePlatformID() { - ValidPlatforms = new string[] {ApplePlatformID.iOS, ApplePlatformID.macOS, ApplePlatformID.tvOS, ApplePlatformID.iPhoneSimulator, ApplePlatformID.AppleTVSimulator}; + ValidPlatforms = new string[] {ApplePlatformID.iOS, ApplePlatformID.macOS, ApplePlatformID.tvOS, ApplePlatformID.iPhoneSimulator, ApplePlatformID.AppleTVSimulator, ApplePlatformID.visionOS, ApplePlatformID.VisionSimulator}; } } @@ -179,6 +181,7 @@ static ApplePlugInEnvironment() /// /// As soon as the Unity Editor creates the ApplePluginEnvironment, this event handler will be added to initialize the _appleUnityPackages dictionary. + /// Once initialization has occured, this method will handle runtime validation for available libraries against selected Unity Editor settings. /// private static void OnEditorUpdate() { @@ -317,6 +320,14 @@ public static string GetApplePlatformID(BuildTarget unityBuildTarget) default: return ApplePlatformID.Unknown; } + case BuildTarget.VisionOS: + switch (PlayerSettings.VisionOS.sdkVersion) + { + case VisionOSSdkVersion.Device: return ApplePlatformID.visionOS; + case VisionOSSdkVersion.Simulator: return ApplePlatformID.VisionSimulator; + default: return ApplePlatformID.Unknown; + } + case BuildTarget.StandaloneOSX: return ApplePlatformID.macOS; default: return ApplePlatformID.Unknown; @@ -343,6 +354,11 @@ public static BuildTarget GetUnityBuildTarget(string applePlatformId) return BuildTarget.tvOS; } + if (applePlatformId == ApplePlatformID.visionOS || applePlatformId == ApplePlatformID.VisionSimulator) + { + return BuildTarget.VisionOS; + } + if (applePlatformId == ApplePlatformID.macOS) { return BuildTarget.StandaloneOSX; @@ -459,7 +475,7 @@ private static void LogLibrarySummary() bool librariesFound = false; foreach (AppleUnityPackage package in _appleUnityPackages.Values) { - summary += $"{package.DisplayName} [{package.Name}]:\n Package Source Path: {package.SourcePath}\n"; + summary += $"\n{package.DisplayName} [{package.Name}]:\n Package Source Path: {package.SourcePath}\n"; var debugLibraries = package.GetLibraries(AppleConfigID.Debug); if (debugLibraries.Length > 0) { @@ -518,10 +534,10 @@ public static class AppleNativeLibraryUtility /// Gets the native library root folder for the generated Xcode project. /// /// - /// When building Xcode projects for macOS, Unity puts everything but the project under an additional folder "/{Application.productName}" - we'll honor this folder hierarchy. + /// When building Xcode projects for macOS, Unity puts everything but the project under an additional folder "/{Application.productName}" - this script will respect this folder hierarchy. /// Output paths will of the following form: - /// iOS/tvOS: [XCODE_PROJECT_DIR]/ApplePluginLibraries/[PLUGIN_NAME]/ApplePluginLibrary.suffix - /// macOS: [XCODE_PROJECT_DIR]/[Application.productName]/ApplePluginLibraries/[PLUGIN_NAME]/ApplePluginLibrary.suffix + /// iOS/tvOS/visionOS: [XCODE_PROJECT_DIR]/ApplePluginLibraries/[PLUGIN_NAME]/ApplePluginLibrary.suffix + /// macOS: [XCODE_PROJECT_DIR]/[Application.productName]/ApplePluginLibraries/[PLUGIN_NAME]/ApplePluginLibrary.suffix /// /// Current Unity BuildTarget /// A string representing the path to the destination libraries, relative to the generated Xcode project's PROJECT_DIR folder. @@ -622,7 +638,7 @@ public static void ProcessWrapperLibrary(string pluginDisplayName, BuildTarget u // Destination paths are different depending upon the following scenarios: // 1. Building a Mac app directly: [OUTPUT_APP_PATH]/Contents/PlugIns // 2. Build an Xcode project which targets macOS: [XCODE_PROJECT_DIR]/[Application.productName]/ApplePluginLibraries/[PLUGIN_NAME]/ - // 3. Build an Xcode project which targets iOS/tvOS: [XCODE_PROJECT_DIR]/ApplePluginLibraries/[PLUGIN_NAME]/ + // 3. Build an Xcode project which targets iOS/tvOS/visionOS: [XCODE_PROJECT_DIR]/ApplePluginLibraries/[PLUGIN_NAME]/ // // In the first (1.) case, no linking is necessary. Each library .bundle must be copied to the correct location in the containing .app bundle // The path used in this case corresponds to the Xcode build setting PLUGINS_FOLDER_PATH @@ -729,4 +745,4 @@ private static bool UpdateUnityProjectLinkerConfig(string unityTargetGuid, strin } } } -#endif // #if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#endif // #if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) diff --git a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleSecurityBuildStep.cs b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleSecurityBuildStep.cs index 3727e68d..5d8a8a2d 100644 --- a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleSecurityBuildStep.cs +++ b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleSecurityBuildStep.cs @@ -1,7 +1,7 @@ using UnityEditor; using UnityEngine; -#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) using UnityEditor.iOS.Xcode; #endif @@ -61,7 +61,7 @@ public class AppleSecurityBuildStep : AppleBuildStep public bool AllowMoviesReadOnly; [Tooltip("A Boolean value that indicates whether the app may have read-write access to the Movies folder.")] public bool AllowMoviesReadWrite; -#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) public override void OnProcessEntitlements(AppleBuildProfile appleBuildProfile, BuildTarget buildTarget, string pathToBuiltTarget, PlistDocument entitlements) { if (AppSandboxEntitlement) @@ -131,6 +131,6 @@ public override void OnProcessEntitlements(AppleBuildProfile appleBuildProfile, if(AllowMoviesReadWrite) entitlements.root.SetBoolean("com.apple.security.assets.movies.read-write", true); } -#endif // (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#endif // (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) } } diff --git a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleUnityPackage.cs b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleUnityPackage.cs index 95d6242c..a00a4410 100644 --- a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleUnityPackage.cs +++ b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleUnityPackage.cs @@ -1,4 +1,4 @@ -#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) using System; using System.Collections.Generic; using System.IO; @@ -188,4 +188,4 @@ public AppleNativeLibrary[] GetLibraries(string appleConfig = "") private Dictionary> _nativeLibraryCollection; } } -#endif // (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#endif // (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) diff --git a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleUserManagementBuildStep.cs b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleUserManagementBuildStep.cs index d8bcf976..32e15ce6 100644 --- a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleUserManagementBuildStep.cs +++ b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleUserManagementBuildStep.cs @@ -1,7 +1,7 @@ using UnityEditor; using UnityEngine; -#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) using UnityEditor.iOS.Xcode; #endif @@ -21,7 +21,7 @@ public void Reset() IsEnabled = false; } -#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) public override void OnProcessEntitlements(AppleBuildProfile appleBuildProfile, BuildTarget buildTarget, string pathToBuiltTarget, PlistDocument entitlements) { if (buildTarget == BuildTarget.tvOS) diff --git a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/CodsignCommand.cs b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/CodsignCommand.cs index db672478..8b540339 100644 --- a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/CodsignCommand.cs +++ b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/CodsignCommand.cs @@ -1,4 +1,4 @@ -#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) using System.Collections.Generic; using System.IO; @@ -91,4 +91,4 @@ public int Run() } } } -#endif // (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#endif // (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) diff --git a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/KeychainCommand.cs b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/KeychainCommand.cs index 75e7469e..42c55644 100644 --- a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/KeychainCommand.cs +++ b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/KeychainCommand.cs @@ -1,4 +1,4 @@ -#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) using System.IO; namespace Apple.Core @@ -75,4 +75,4 @@ public int RestoreLoginDefaultKeychain() } } } -#endif // (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#endif // (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) diff --git a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/ProductBuildCommand.cs b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/ProductBuildCommand.cs index 65f0102f..46693b60 100644 --- a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/ProductBuildCommand.cs +++ b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/ProductBuildCommand.cs @@ -1,4 +1,4 @@ -#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) using System.Collections.Generic; using System.IO; @@ -45,4 +45,4 @@ public int Run(string pkgOutputPath) } } } -#endif // (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#endif // (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) diff --git a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/ProductSignCommand.cs b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/ProductSignCommand.cs index cf9b9e9d..5ec52806 100644 --- a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/ProductSignCommand.cs +++ b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/ProductSignCommand.cs @@ -1,4 +1,4 @@ -#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) namespace Apple.Core { @@ -12,4 +12,4 @@ public int Run(string codeSigningIdentifier, string unsignedPKGPath, string sign } } } -#endif // (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#endif // (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) diff --git a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/ShellCommandRunner.cs b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/ShellCommandRunner.cs index d42d83e1..9ea48401 100644 --- a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/ShellCommandRunner.cs +++ b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/ShellCommandRunner.cs @@ -1,4 +1,4 @@ -#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) using System; using UnityEngine; @@ -96,4 +96,4 @@ private static string SanitizeForLog(string outputLog, string[] maskValues) } } } -#endif // (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#endif // (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) diff --git a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/XcodeBuildCommand.cs b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/XcodeBuildCommand.cs index badcba21..47b3f0ff 100644 --- a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/XcodeBuildCommand.cs +++ b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/XcodeBuildCommand.cs @@ -1,4 +1,4 @@ -#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) using System.Collections.Generic; using System.IO; @@ -125,4 +125,4 @@ public int Export() } } } -#endif // (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#endif // (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) diff --git a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/XcrunCommand.cs b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/XcrunCommand.cs index 94fa008f..1419f572 100644 --- a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/XcrunCommand.cs +++ b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/XcrunCommand.cs @@ -1,4 +1,4 @@ -#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) using System.Collections.Generic; using System.IO; @@ -50,4 +50,4 @@ public int UploadApp() } } } -#endif // (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#endif // (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) diff --git a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Runtime/Apple.Core.asmdef b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Runtime/Apple.Core.asmdef index e157a04e..fc59d4b2 100644 --- a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Runtime/Apple.Core.asmdef +++ b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Runtime/Apple.Core.asmdef @@ -1,11 +1,13 @@ { "name": "Apple.Core", + "rootNamespace": "", "references": [], "includePlatforms": [ "Editor", "iOS", "macOSStandalone", - "tvOS" + "tvOS", + "VisionOS" ], "excludePlatforms": [], "allowUnsafeCode": false, diff --git a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Runtime/AvailabilityAttributes.cs b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Runtime/AvailabilityAttributes.cs index 345346fc..8cb2ef1a 100644 --- a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Runtime/AvailabilityAttributes.cs +++ b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Runtime/AvailabilityAttributes.cs @@ -15,6 +15,7 @@ public class IntroducedAttribute : Attribute public RuntimeVersion? iOS { get => _osVersions[RuntimeOperatingSystem.iOS]; } public RuntimeVersion? macOS { get => _osVersions[RuntimeOperatingSystem.macOS]; } public RuntimeVersion? tvOS { get => _osVersions[RuntimeOperatingSystem.tvOS]; } + public RuntimeVersion? visionOS { get => _osVersions[RuntimeOperatingSystem.visionOS]; } // Access by OperatingSystem public RuntimeVersion? OperatingSystemVersion(RuntimeOperatingSystem operatingSystem) @@ -29,13 +30,14 @@ public class IntroducedAttribute : Attribute protected SortedList _osVersions; - public IntroducedAttribute(string iOS = "", string macOS = "", string tvOS = "") + public IntroducedAttribute(string iOS = "", string macOS = "", string tvOS = "", string visionOS = "") { _osVersions = new SortedList(); _osVersions[RuntimeOperatingSystem.iOS] = RuntimeVersion.FromString(iOS); _osVersions[RuntimeOperatingSystem.macOS] = RuntimeVersion.FromString(macOS); _osVersions[RuntimeOperatingSystem.tvOS] = RuntimeVersion.FromString(tvOS); + _osVersions[RuntimeOperatingSystem.visionOS] = RuntimeVersion.FromString(visionOS); } } @@ -65,7 +67,7 @@ public class DeprecatedAttribute : IntroducedAttribute protected string _message; public string Message { get => _message; } - public DeprecatedAttribute(string message, string iOS = "", string macOS = "", string tvOS = "") : base(iOS, macOS, tvOS) + public DeprecatedAttribute(string message, string iOS = "", string macOS = "", string tvOS = "", string visionOS = "") : base(iOS, macOS, tvOS, visionOS) { _message = message; } @@ -78,7 +80,7 @@ public DeprecatedAttribute(string message, string iOS = "", string macOS = "", s [System.AttributeUsage(System.AttributeTargets.All)] public class RenamedAttribute : DeprecatedAttribute { - public RenamedAttribute(string message, string iOS = "", string macOS = "", string tvOS = "") : base(message, iOS, macOS, tvOS) {} + public RenamedAttribute(string message, string iOS = "", string macOS = "", string tvOS = "", string visionOS = "") : base(message, iOS, macOS, tvOS, visionOS) {} } /// @@ -88,6 +90,6 @@ public RenamedAttribute(string message, string iOS = "", string macOS = "", stri [System.AttributeUsage(System.AttributeTargets.All)] public class ObsoletedAttribute : DeprecatedAttribute { - public ObsoletedAttribute(string message, string iOS = "", string macOS = "", string tvOS = "") : base(message, iOS, macOS, tvOS) {} + public ObsoletedAttribute(string message, string iOS = "", string macOS = "", string tvOS = "", string visionOS = "") : base(message, iOS, macOS, tvOS, visionOS) {} } } diff --git a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Runtime/InteropUtility.cs b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Runtime/InteropUtility.cs index 53860537..2010cd03 100644 --- a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Runtime/InteropUtility.cs +++ b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Runtime/InteropUtility.cs @@ -2,7 +2,7 @@ { internal static class InteropUtility { -#if UNITY_IOS || UNITY_TVOS +#if (UNITY_IOS || UNITY_TVOS || UNITY_VISIONOS) && !UNITY_EDITOR public const string DLLName = "__Internal"; #else public const string DLLName = "AppleCoreNativeMac"; diff --git a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Runtime/RuntimeEnvironment.cs b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Runtime/RuntimeEnvironment.cs index 17bec381..dc8283d6 100644 --- a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Runtime/RuntimeEnvironment.cs +++ b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Runtime/RuntimeEnvironment.cs @@ -11,6 +11,7 @@ public enum RuntimeOperatingSystem : uint iOS = 1, macOS = 2, tvOS = 3, + visionOS = 4, // New operating systems should be added above this line. RuntimeOperatingSystemCount diff --git a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/package.json b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/package.json index 77e021df..ccb1a2a0 100644 --- a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/package.json +++ b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/package.json @@ -2,7 +2,7 @@ "name": "com.apple.unityplugin.core", "displayName": "Apple.Core", "description": "Provides project settings, post-build automation tools, and other shared functionality for Apple Unity Plug-ins.", - "version": "3.0.0", + "version": "3.1.0", "unity": "2022.3", "keywords": [ "apple" diff --git a/plug-ins/Apple.Core/Apple.Core_Unity/ProjectSettings/ProjectSettings.asset b/plug-ins/Apple.Core/Apple.Core_Unity/ProjectSettings/ProjectSettings.asset index 4a9ad3f6..300a3d68 100644 --- a/plug-ins/Apple.Core/Apple.Core_Unity/ProjectSettings/ProjectSettings.asset +++ b/plug-ins/Apple.Core/Apple.Core_Unity/ProjectSettings/ProjectSettings.asset @@ -162,6 +162,7 @@ PlayerSettings: androidMaxAspectRatio: 2.1 applicationIdentifier: Standalone: com.DefaultCompany.Unity + VisionOS: com.DefaultCompany.Unity iPhone: com.DefaultCompany.Unity buildNumber: Standalone: 0 @@ -190,7 +191,7 @@ PlayerSettings: tvOSSdkVersion: 0 tvOSRequireExtendedGameController: 0 tvOSTargetOSVersionString: 12.0 - VisionOSSdkVersion: 0 + VisionOSSdkVersion: 1 VisionOSTargetOSVersionString: 1.0 uIPrerenderedIcon: 0 uIRequiresPersistentWiFi: 0 diff --git a/plug-ins/Apple.Core/Native/AppleCoreNative.xcodeproj/project.pbxproj b/plug-ins/Apple.Core/Native/AppleCoreNative.xcodeproj/project.pbxproj index 99c08913..343225ce 100644 --- a/plug-ins/Apple.Core/Native/AppleCoreNative.xcodeproj/project.pbxproj +++ b/plug-ins/Apple.Core/Native/AppleCoreNative.xcodeproj/project.pbxproj @@ -16,6 +16,22 @@ 245B212A27DEA521007479CE /* NSError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 245B212627DEA521007479CE /* NSError.swift */; }; 245B212B27DEA521007479CE /* NSError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 245B212627DEA521007479CE /* NSError.swift */; }; 245B212C27DEA521007479CE /* NSError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 245B212627DEA521007479CE /* NSError.swift */; }; + 24B064032B7EDFE5007ABBB8 /* ACRuntimeEnvironment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24B8F1882A73397C00914A67 /* ACRuntimeEnvironment.swift */; }; + 24B064042B7EDFEE007ABBB8 /* AppleCore_BridgingHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = 244F33522A6F0A2B005099AE /* AppleCore_BridgingHeader.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 24B064052B7EDFF3007ABBB8 /* AppleCoreNative.h in Headers */ = {isa = PBXBuildFile; fileRef = CFE5338F263B6CCC00078448 /* AppleCoreNative.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 24B064062B7EDFFA007ABBB8 /* AppleCoreRuntimeShared.swift in Sources */ = {isa = PBXBuildFile; fileRef = 245B212227DEA517007479CE /* AppleCoreRuntimeShared.swift */; }; + 24B064072B7EDFFD007ABBB8 /* CoreUtilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = CFE53398263B6D1400078448 /* CoreUtilities.swift */; }; + 24B064082B7EE010007ABBB8 /* NSArray.m in Sources */ = {isa = PBXBuildFile; fileRef = FB32D8782AF96000006A8FE4 /* NSArray.m */; }; + 24B064092B7EE012007ABBB8 /* NSData.m in Sources */ = {isa = PBXBuildFile; fileRef = FB8FF4912B338A110058B918 /* NSData.m */; }; + 24B0640A2B7EE016007ABBB8 /* NSDictionary.m in Sources */ = {isa = PBXBuildFile; fileRef = FB32D8802AFAADAA006A8FE4 /* NSDictionary.m */; }; + 24B0640B2B7EE019007ABBB8 /* NSError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 245B212627DEA521007479CE /* NSError.swift */; }; + 24B0640C2B7EE01C007ABBB8 /* NSException.m in Sources */ = {isa = PBXBuildFile; fileRef = FB6C73C22AFDA7800077714C /* NSException.m */; }; + 24B0640D2B7EE01F007ABBB8 /* NSMutableArray.m in Sources */ = {isa = PBXBuildFile; fileRef = FB32D87C2AF97A09006A8FE4 /* NSMutableArray.m */; }; + 24B0640E2B7EE028007ABBB8 /* NSMutableDictionary.m in Sources */ = {isa = PBXBuildFile; fileRef = FB32D8842AFADF1A006A8FE4 /* NSMutableDictionary.m */; }; + 24B0640F2B7EE02B007ABBB8 /* NSNull.m in Sources */ = {isa = PBXBuildFile; fileRef = FB8694402AD47FFA009B8676 /* NSNull.m */; }; + 24B064102B7EE02E007ABBB8 /* NSNumber.m in Sources */ = {isa = PBXBuildFile; fileRef = FBB2BEBF2AC77D160040E5E0 /* NSNumber.m */; }; + 24B064112B7EE031007ABBB8 /* NSObject.m in Sources */ = {isa = PBXBuildFile; fileRef = FB86943C2ACF32FB009B8676 /* NSObject.m */; }; + 24B064122B7EE034007ABBB8 /* NSString.m in Sources */ = {isa = PBXBuildFile; fileRef = FBB2BEC32ACB2FDE0040E5E0 /* NSString.m */; }; 24B8F1892A73397C00914A67 /* ACRuntimeEnvironment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24B8F1882A73397C00914A67 /* ACRuntimeEnvironment.swift */; }; 24B8F18A2A73397C00914A67 /* ACRuntimeEnvironment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24B8F1882A73397C00914A67 /* ACRuntimeEnvironment.swift */; }; 24B8F18B2A73397C00914A67 /* ACRuntimeEnvironment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24B8F1882A73397C00914A67 /* ACRuntimeEnvironment.swift */; }; @@ -63,6 +79,7 @@ 244F33522A6F0A2B005099AE /* AppleCore_BridgingHeader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppleCore_BridgingHeader.h; sourceTree = ""; }; 245B212227DEA517007479CE /* AppleCoreRuntimeShared.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppleCoreRuntimeShared.swift; sourceTree = ""; }; 245B212627DEA521007479CE /* NSError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSError.swift; sourceTree = ""; }; + 24B063FC2B7EDC73007ABBB8 /* AppleCoreNative.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AppleCoreNative.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 24B8F1882A73397C00914A67 /* ACRuntimeEnvironment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ACRuntimeEnvironment.swift; sourceTree = ""; }; CFE5338C263B6CCC00078448 /* AppleCoreNative.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AppleCoreNative.framework; sourceTree = BUILT_PRODUCTS_DIR; }; CFE5338F263B6CCC00078448 /* AppleCoreNative.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppleCoreNative.h; sourceTree = ""; }; @@ -83,6 +100,13 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 24B063F92B7EDC73007ABBB8 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; CFE53389263B6CCC00078448 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -123,6 +147,7 @@ CFE5338C263B6CCC00078448 /* AppleCoreNative.framework */, CFE533AA263B6E2200078448 /* AppleCoreNative.framework */, CFE533C5263B6E4800078448 /* AppleCoreNativeMac.bundle */, + 24B063FC2B7EDC73007ABBB8 /* AppleCoreNative.framework */, ); name = Products; sourceTree = ""; @@ -154,6 +179,15 @@ /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ + 24B063F72B7EDC73007ABBB8 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 24B064042B7EDFEE007ABBB8 /* AppleCore_BridgingHeader.h in Headers */, + 24B064052B7EDFF3007ABBB8 /* AppleCoreNative.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; CFE53387263B6CCC00078448 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -184,6 +218,24 @@ /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ + 24B063FB2B7EDC73007ABBB8 /* AppleCoreNative_visionOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 24B064022B7EDC73007ABBB8 /* Build configuration list for PBXNativeTarget "AppleCoreNative_visionOS" */; + buildPhases = ( + 24B063F72B7EDC73007ABBB8 /* Headers */, + 24B063F82B7EDC73007ABBB8 /* Sources */, + 24B063F92B7EDC73007ABBB8 /* Frameworks */, + 24B063FA2B7EDC73007ABBB8 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = AppleCoreNative_visionOS; + productName = AppleCoreNative_visionOS; + productReference = 24B063FC2B7EDC73007ABBB8 /* AppleCoreNative.framework */; + productType = "com.apple.product-type.framework"; + }; CFE5338B263B6CCC00078448 /* AppleCoreNative_iOS */ = { isa = PBXNativeTarget; buildConfigurationList = CFE53394263B6CCC00078448 /* Build configuration list for PBXNativeTarget "AppleCoreNative_iOS" */; @@ -246,6 +298,9 @@ attributes = { LastUpgradeCheck = 1220; TargetAttributes = { + 24B063FB2B7EDC73007ABBB8 = { + CreatedOnToolsVersion = 15.2; + }; CFE5338B263B6CCC00078448 = { CreatedOnToolsVersion = 12.2; LastSwiftMigration = 1500; @@ -273,12 +328,20 @@ targets = ( CFE5338B263B6CCC00078448 /* AppleCoreNative_iOS */, CFE5339F263B6E2200078448 /* AppleCoreNative_tvOS */, + 24B063FB2B7EDC73007ABBB8 /* AppleCoreNative_visionOS */, CFE533C4263B6E4800078448 /* AppleCoreNative_Mac */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + 24B063FA2B7EDC73007ABBB8 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; CFE5338A263B6CCC00078448 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -303,6 +366,27 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + 24B063F82B7EDC73007ABBB8 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 24B0640C2B7EE01C007ABBB8 /* NSException.m in Sources */, + 24B064082B7EE010007ABBB8 /* NSArray.m in Sources */, + 24B064032B7EDFE5007ABBB8 /* ACRuntimeEnvironment.swift in Sources */, + 24B0640E2B7EE028007ABBB8 /* NSMutableDictionary.m in Sources */, + 24B0640B2B7EE019007ABBB8 /* NSError.swift in Sources */, + 24B0640A2B7EE016007ABBB8 /* NSDictionary.m in Sources */, + 24B0640D2B7EE01F007ABBB8 /* NSMutableArray.m in Sources */, + 24B064102B7EE02E007ABBB8 /* NSNumber.m in Sources */, + 24B0640F2B7EE02B007ABBB8 /* NSNull.m in Sources */, + 24B064122B7EE034007ABBB8 /* NSString.m in Sources */, + 24B064112B7EE031007ABBB8 /* NSObject.m in Sources */, + 24B064062B7EDFFA007ABBB8 /* AppleCoreRuntimeShared.swift in Sources */, + 24B064092B7EE012007ABBB8 /* NSData.m in Sources */, + 24B064072B7EDFFD007ABBB8 /* CoreUtilities.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; CFE53388263B6CCC00078448 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -369,6 +453,75 @@ /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ + 24B064002B7EDC73007ABBB8 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 240646112B61F5F000246067 /* Core.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MACOSX_DEPLOYMENT_TARGET = 10.15; + PRODUCT_BUNDLE_IDENTIFIER = "com.apple-plugins.AppleCoreNative-visionOS"; + PRODUCT_NAME = AppleCoreNative; + SDKROOT = xros; + SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "xros xrsimulator"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 7; + TVOS_DEPLOYMENT_TARGET = 13.0; + WATCHOS_DEPLOYMENT_TARGET = ""; + XROS_DEPLOYMENT_TARGET = 1.0; + }; + name = Debug; + }; + 24B064012B7EDC73007ABBB8 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 240646112B61F5F000246067 /* Core.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MACOSX_DEPLOYMENT_TARGET = 10.15; + PRODUCT_BUNDLE_IDENTIFIER = "com.apple-plugins.AppleCoreNative-visionOS"; + PRODUCT_NAME = AppleCoreNative; + SDKROOT = xros; + SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "xros xrsimulator"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 7; + TVOS_DEPLOYMENT_TARGET = 13.0; + VALIDATE_PRODUCT = YES; + WATCHOS_DEPLOYMENT_TARGET = ""; + XROS_DEPLOYMENT_TARGET = 1.0; + }; + name = Release; + }; CFE53392263B6CCC00078448 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 240646112B61F5F000246067 /* Core.xcconfig */; @@ -422,6 +575,10 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = AppleCoreNative/Info.plist; + INFOPLIST_KEY_NSHumanReadableCopyright = "\"Copyright © 2021 - 2024 Apple, Inc. All rights reserved.\""; + INFOPLIST_OUTPUT_FORMAT = XML; MACOSX_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; @@ -481,6 +638,10 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = AppleCoreNative/Info.plist; + INFOPLIST_KEY_NSHumanReadableCopyright = "\"Copyright © 2021 - 2024 Apple, Inc. All rights reserved.\""; + INFOPLIST_OUTPUT_FORMAT = XML; MACOSX_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; @@ -503,8 +664,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = AppleCoreNative/Info.plist; - INFOPLIST_OUTPUT_FORMAT = XML; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -537,8 +696,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = AppleCoreNative/Info.plist; - INFOPLIST_OUTPUT_FORMAT = XML; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -570,8 +727,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = AppleCoreNative/Info.plist; - INFOPLIST_OUTPUT_FORMAT = XML; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -603,8 +758,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = AppleCoreNative/Info.plist; - INFOPLIST_OUTPUT_FORMAT = XML; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -630,8 +783,6 @@ buildSettings = { CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = AppleCoreNative/Info.plist; - INFOPLIST_OUTPUT_FORMAT = XML; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; MACOSX_DEPLOYMENT_TARGET = 10.15; @@ -652,8 +803,6 @@ buildSettings = { CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = AppleCoreNative/Info.plist; - INFOPLIST_OUTPUT_FORMAT = XML; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; MACOSX_DEPLOYMENT_TARGET = 10.15; @@ -671,6 +820,15 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 24B064022B7EDC73007ABBB8 /* Build configuration list for PBXNativeTarget "AppleCoreNative_visionOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 24B064002B7EDC73007ABBB8 /* Debug */, + 24B064012B7EDC73007ABBB8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; CFE53386263B6CCC00078448 /* Build configuration list for PBXProject "AppleCoreNative" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/plug-ins/Apple.Core/Native/AppleCoreNative.xcodeproj/xcshareddata/xcschemes/visionOS - Debug.xcscheme b/plug-ins/Apple.Core/Native/AppleCoreNative.xcodeproj/xcshareddata/xcschemes/visionOS - Debug.xcscheme new file mode 100644 index 00000000..dcf49b6d --- /dev/null +++ b/plug-ins/Apple.Core/Native/AppleCoreNative.xcodeproj/xcshareddata/xcschemes/visionOS - Debug.xcscheme @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plug-ins/Apple.Core/Native/AppleCoreNative.xcodeproj/xcshareddata/xcschemes/visionOS - Release.xcscheme b/plug-ins/Apple.Core/Native/AppleCoreNative.xcodeproj/xcshareddata/xcschemes/visionOS - Release.xcscheme new file mode 100644 index 00000000..15371515 --- /dev/null +++ b/plug-ins/Apple.Core/Native/AppleCoreNative.xcodeproj/xcshareddata/xcschemes/visionOS - Release.xcscheme @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plug-ins/Apple.Core/Native/AppleCoreNative/AppleCoreNative.h b/plug-ins/Apple.Core/Native/AppleCoreNative/AppleCoreNative.h index 566082ba..e66e3a64 100644 --- a/plug-ins/Apple.Core/Native/AppleCoreNative/AppleCoreNative.h +++ b/plug-ins/Apple.Core/Native/AppleCoreNative/AppleCoreNative.h @@ -37,6 +37,6 @@ typedef struct { float right; } InteropEdgeInset; -#if TARGET_OS_IOS || TARGET_OS_TV +#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION #import "AppleCore_BridgingHeader.h" #endif diff --git a/plug-ins/Apple.Core/Native/AppleCoreNative/AppleCore_BridgingHeader.h b/plug-ins/Apple.Core/Native/AppleCoreNative/AppleCore_BridgingHeader.h index 275adef1..b1cef776 100644 --- a/plug-ins/Apple.Core/Native/AppleCoreNative/AppleCore_BridgingHeader.h +++ b/plug-ins/Apple.Core/Native/AppleCoreNative/AppleCore_BridgingHeader.h @@ -13,6 +13,7 @@ typedef enum { iOS = 1, macOS = 2, tvOS = 3, + visionOS = 4 } ACOperatingSystem; typedef struct { diff --git a/plug-ins/Apple.Core/Native/AppleCoreNative/CoreUtilities.swift b/plug-ins/Apple.Core/Native/AppleCoreNative/CoreUtilities.swift index 23fbb818..18c372b3 100644 --- a/plug-ins/Apple.Core/Native/AppleCoreNative/CoreUtilities.swift +++ b/plug-ins/Apple.Core/Native/AppleCoreNative/CoreUtilities.swift @@ -18,7 +18,9 @@ public func AppleCore_GetRuntimeEnvironment() -> ACRuntimeEnvironment { let osVersion = ProcessInfo.processInfo.operatingSystemVersion -#if os(iOS) +#if os(visionOS) + return ACRuntimeEnvironment(operatingSystem: visionOS, majorVersion: osVersion.majorVersion, minorVersion: osVersion.minorVersion) +#elseif os(iOS) return ACRuntimeEnvironment(operatingSystem: iOS, majorVersion: osVersion.majorVersion, minorVersion: osVersion.minorVersion) #elseif os(macOS) return ACRuntimeEnvironment(operatingSystem: macOS, majorVersion: osVersion.majorVersion, minorVersion: osVersion.minorVersion) diff --git a/plug-ins/Apple.CoreHaptics/Apple.CoreHaptics_Unity/Assets/Apple.CoreHaptics/CHANGELOG.md b/plug-ins/Apple.CoreHaptics/Apple.CoreHaptics_Unity/Assets/Apple.CoreHaptics/CHANGELOG.md index f028556e..cae599ec 100644 --- a/plug-ins/Apple.CoreHaptics/Apple.CoreHaptics_Unity/Assets/Apple.CoreHaptics/CHANGELOG.md +++ b/plug-ins/Apple.CoreHaptics/Apple.CoreHaptics_Unity/Assets/Apple.CoreHaptics/CHANGELOG.md @@ -1,6 +1,10 @@ # CHANGELOG All notable changes to this project will be documented in this file. +## [1.2.0] - 2024-02-23 +### Added +- Support for visionOS + ## [1.1.0] - 2024-02-11 ### Updated - Adopt Apple.Core 3.0.0 diff --git a/plug-ins/Apple.CoreHaptics/Apple.CoreHaptics_Unity/Assets/Apple.CoreHaptics/Editor/CHBuildStep.cs b/plug-ins/Apple.CoreHaptics/Apple.CoreHaptics_Unity/Assets/Apple.CoreHaptics/Editor/CHBuildStep.cs index 89abdf43..2ad72b5f 100644 --- a/plug-ins/Apple.CoreHaptics/Apple.CoreHaptics_Unity/Assets/Apple.CoreHaptics/Editor/CHBuildStep.cs +++ b/plug-ins/Apple.CoreHaptics/Apple.CoreHaptics_Unity/Assets/Apple.CoreHaptics/Editor/CHBuildStep.cs @@ -4,7 +4,7 @@ using UnityEditor; using UnityEngine; -#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) using UnityEditor.iOS.Xcode; #endif @@ -13,15 +13,15 @@ namespace Apple.CoreHaptics.Editor public class CHBuildStep : AppleBuildStep { public override string DisplayName => "Apple.CoreHaptics"; - public override BuildTarget[] SupportedTargets => new BuildTarget[] {BuildTarget.iOS, BuildTarget.tvOS, BuildTarget.StandaloneOSX}; + public override BuildTarget[] SupportedTargets => new BuildTarget[] {BuildTarget.iOS, BuildTarget.tvOS, BuildTarget.StandaloneOSX, BuildTarget.VisionOS}; -#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) public override void OnProcessFrameworks(AppleBuildProfile _, BuildTarget buildTarget, string generatedProjectPath, PBXProject pbxProject) { if (Array.IndexOf(SupportedTargets, buildTarget) > -1) { AppleNativeLibraryUtility.ProcessWrapperLibrary(DisplayName, buildTarget, generatedProjectPath, pbxProject); - AppleNativeLibraryUtility.AddPlatformFrameworkDependency("CoreHaptics.framework", false, buildTarget, pbxProject); + AppleNativeLibraryUtility.AddPlatformFrameworkDependency("CoreHaptics.framework", isWeaklyLinked: false, buildTarget, pbxProject); } else { diff --git a/plug-ins/Apple.CoreHaptics/Apple.CoreHaptics_Unity/Assets/Apple.CoreHaptics/Source/Misc/InteropUtility.cs b/plug-ins/Apple.CoreHaptics/Apple.CoreHaptics_Unity/Assets/Apple.CoreHaptics/Source/Misc/InteropUtility.cs index 3146e2a6..ddcdc2d6 100644 --- a/plug-ins/Apple.CoreHaptics/Apple.CoreHaptics_Unity/Assets/Apple.CoreHaptics/Source/Misc/InteropUtility.cs +++ b/plug-ins/Apple.CoreHaptics/Apple.CoreHaptics_Unity/Assets/Apple.CoreHaptics/Source/Misc/InteropUtility.cs @@ -2,7 +2,7 @@ { internal static class CHInteropUtility { -#if (UNITY_IOS || UNITY_TVOS) && !UNITY_EDITOR +#if (UNITY_IOS || UNITY_TVOS || UNITY_VISIONOS) && !UNITY_EDITOR public const string DllName = "__Internal"; #else public const string DllName = "CoreHapticsWrapper"; diff --git a/plug-ins/Apple.CoreHaptics/Apple.CoreHaptics_Unity/Assets/Apple.CoreHaptics/package.json b/plug-ins/Apple.CoreHaptics/Apple.CoreHaptics_Unity/Assets/Apple.CoreHaptics/package.json index 6ebca23e..e15ac437 100644 --- a/plug-ins/Apple.CoreHaptics/Apple.CoreHaptics_Unity/Assets/Apple.CoreHaptics/package.json +++ b/plug-ins/Apple.CoreHaptics/Apple.CoreHaptics_Unity/Assets/Apple.CoreHaptics/package.json @@ -1,11 +1,11 @@ { "name": "com.apple.unityplugin.corehaptics", - "version": "1.1.0", + "version": "1.2.0", "displayName": "Apple.CoreHaptics", "description": "Apple's CoreHaptics.framework ported to Unity", "unity": "2022.3", "dependencies": { - "com.apple.unityplugin.core": "3.0.0" + "com.apple.unityplugin.core": "3.1.0" }, "keywords": [ "haptics", diff --git a/plug-ins/Apple.CoreHaptics/Apple.CoreHaptics_Unity/ProjectSettings/ProjectSettings.asset b/plug-ins/Apple.CoreHaptics/Apple.CoreHaptics_Unity/ProjectSettings/ProjectSettings.asset index c67ac940..9b74d53d 100644 --- a/plug-ins/Apple.CoreHaptics/Apple.CoreHaptics_Unity/ProjectSettings/ProjectSettings.asset +++ b/plug-ins/Apple.CoreHaptics/Apple.CoreHaptics_Unity/ProjectSettings/ProjectSettings.asset @@ -191,7 +191,7 @@ PlayerSettings: tvOSSdkVersion: 0 tvOSRequireExtendedGameController: 0 tvOSTargetOSVersionString: 12.0 - VisionOSSdkVersion: 0 + VisionOSSdkVersion: 1 VisionOSTargetOSVersionString: 1.0 uIPrerenderedIcon: 0 uIRequiresPersistentWiFi: 0 diff --git a/plug-ins/Apple.CoreHaptics/Native/CoreHapticsWrapper.xcodeproj/project.pbxproj b/plug-ins/Apple.CoreHaptics/Native/CoreHapticsWrapper.xcodeproj/project.pbxproj index b6e33a9c..99895e29 100644 --- a/plug-ins/Apple.CoreHaptics/Native/CoreHapticsWrapper.xcodeproj/project.pbxproj +++ b/plug-ins/Apple.CoreHaptics/Native/CoreHapticsWrapper.xcodeproj/project.pbxproj @@ -7,6 +7,33 @@ objects = { /* Begin PBXBuildFile section */ + 24B0641E2B7F0323007ABBB8 /* CoreHapticsWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A55184924E2FC09004CDB45 /* CoreHapticsWrapper.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 24B0641F2B7F0323007ABBB8 /* CHHapticPatternPlayer_BridgingHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A443C722603D68D0048A408 /* CHHapticPatternPlayer_BridgingHeader.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 24B064212B7F0323007ABBB8 /* UIFBG_Protocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = CFFA16EB2756FFA000C62383 /* UIFBG_Protocol.swift */; }; + 24B064222B7F0323007ABBB8 /* General_CallbackTypeDefinitions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A55186124E6FBA0004CDB45 /* General_CallbackTypeDefinitions.swift */; }; + 24B064232B7F0323007ABBB8 /* CHHapticAdvancedPatternPlayer_Protocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A33210F26015D1A00B447CD /* CHHapticAdvancedPatternPlayer_Protocol.swift */; }; + 24B064242B7F0323007ABBB8 /* CHHapticPatternPlayer_Protocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A3320FA26015A3000B447CD /* CHHapticPatternPlayer_Protocol.swift */; }; + 24B064252B7F0323007ABBB8 /* CHHapticAdvancedPatternPlayer_Unsupported.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A33211D26015EB700B447CD /* CHHapticAdvancedPatternPlayer_Unsupported.swift */; }; + 24B064262B7F0323007ABBB8 /* CHHapticPatternPlayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 948088BA25D7052A00D7DAF0 /* CHHapticPatternPlayer.swift */; }; + 24B064272B7F0323007ABBB8 /* CHHapticEngine_Unsupported.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A3320F326014BF500B447CD /* CHHapticEngine_Unsupported.swift */; }; + 24B064282B7F0323007ABBB8 /* Utilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = CF2E64B0272C76D000F63529 /* Utilities.swift */; }; + 24B064292B7F0323007ABBB8 /* UIFBG_Supported.swift in Sources */ = {isa = PBXBuildFile; fileRef = CFFA16F12756FFC000C62383 /* UIFBG_Supported.swift */; }; + 24B0642A2B7F0323007ABBB8 /* CHHapticEngine_Supported.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A3320E526014AD100B447CD /* CHHapticEngine_Supported.swift */; }; + 24B0642B2B7F0323007ABBB8 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A55186624E70042004CDB45 /* Extensions.swift */; }; + 24B0642C2B7F0323007ABBB8 /* CHCapabilities_Supported.swift in Sources */ = {isa = PBXBuildFile; fileRef = CF2E64B8272C7DF300F63529 /* CHCapabilities_Supported.swift */; }; + 24B0642D2B7F0323007ABBB8 /* UIFBG_Unsupported.swift in Sources */ = {isa = PBXBuildFile; fileRef = CFFA16F52756FFCB00C62383 /* UIFBG_Unsupported.swift */; }; + 24B0642E2B7F0323007ABBB8 /* CHHapticPatternPlayer_Supported.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A33210126015AA100B447CD /* CHHapticPatternPlayer_Supported.swift */; }; + 24B0642F2B7F0323007ABBB8 /* CHHapticEngine.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A7D6B9B25DC56FD0072DB37 /* CHHapticEngine.swift */; }; + 24B064302B7F0323007ABBB8 /* CHHapticPatternPlayer_Unsupported.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A33210826015B1000B447CD /* CHHapticPatternPlayer_Unsupported.swift */; }; + 24B064312B7F0323007ABBB8 /* CHHapticAdvancedPatternPlayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9473E3B925DEF3F600B4AD36 /* CHHapticAdvancedPatternPlayer.swift */; }; + 24B064322B7F0323007ABBB8 /* CHCapabilities_Unsupported.swift in Sources */ = {isa = PBXBuildFile; fileRef = CF2E64BC272C7E4900F63529 /* CHCapabilities_Unsupported.swift */; }; + 24B064332B7F0323007ABBB8 /* UIFBG.swift in Sources */ = {isa = PBXBuildFile; fileRef = CFFA16E52756EA9700C62383 /* UIFBG.swift */; }; + 24B064342B7F0323007ABBB8 /* CHCapabilities_Protocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = CF2E64AC272C74FE00F63529 /* CHCapabilities_Protocol.swift */; }; + 24B064352B7F0323007ABBB8 /* CHHapticAdvancedPatternPlayer_Supported.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A33211626015D7F00B447CD /* CHHapticAdvancedPatternPlayer_Supported.swift */; }; + 24B064362B7F0323007ABBB8 /* CHHapticEngine_Protocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A3320EC26014B2E00B447CD /* CHHapticEngine_Protocol.swift */; }; + 24B064372B7F0323007ABBB8 /* CHCapabilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = CF2E64B4272C78F800F63529 /* CHCapabilities.swift */; }; + 24B064392B7F0323007ABBB8 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 948088A325D6DF1B00D7DAF0 /* AVFoundation.framework */; }; + 24B0643A2B7F0323007ABBB8 /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 948088A125D6DF1200D7DAF0 /* CoreHaptics.framework */; }; 7A3320E626014AD100B447CD /* CHHapticEngine_Supported.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A3320E526014AD100B447CD /* CHHapticEngine_Supported.swift */; }; 7A3320E726014AD100B447CD /* CHHapticEngine_Supported.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A3320E526014AD100B447CD /* CHHapticEngine_Supported.swift */; }; 7A3320E826014AD100B447CD /* CHHapticEngine_Supported.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A3320E526014AD100B447CD /* CHHapticEngine_Supported.swift */; }; @@ -88,6 +115,7 @@ /* Begin PBXFileReference section */ 240646132B61FFCD00246067 /* CoreHaptics.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = CoreHaptics.xcconfig; sourceTree = ""; }; + 24B064402B7F0323007ABBB8 /* CoreHapticsWrapper.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CoreHapticsWrapper.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 7A3320E526014AD100B447CD /* CHHapticEngine_Supported.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CHHapticEngine_Supported.swift; sourceTree = ""; }; 7A3320EC26014B2E00B447CD /* CHHapticEngine_Protocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = CHHapticEngine_Protocol.swift; path = CoreHapticsWrapper/Haptics/HapticEngine/CHHapticEngine_Protocol.swift; sourceTree = SOURCE_ROOT; }; 7A3320F326014BF500B447CD /* CHHapticEngine_Unsupported.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CHHapticEngine_Unsupported.swift; sourceTree = ""; }; @@ -123,6 +151,15 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 24B064382B7F0323007ABBB8 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 24B064392B7F0323007ABBB8 /* AVFoundation.framework in Frameworks */, + 24B0643A2B7F0323007ABBB8 /* CoreHaptics.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 7A55184324E2FC09004CDB45 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -165,6 +202,7 @@ 7A55184624E2FC09004CDB45 /* CoreHapticsWrapper.framework */, 7A55185524E2FF56004CDB45 /* CoreHapticsWrapper.bundle */, 7AE5BB812502C06C00BDBEDA /* CoreHapticsWrapper.framework */, + 24B064402B7F0323007ABBB8 /* CoreHapticsWrapper.framework */, ); name = Products; sourceTree = ""; @@ -263,6 +301,15 @@ /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ + 24B0641D2B7F0323007ABBB8 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 24B0641E2B7F0323007ABBB8 /* CoreHapticsWrapper.h in Headers */, + 24B0641F2B7F0323007ABBB8 /* CHHapticPatternPlayer_BridgingHeader.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 7A55184124E2FC09004CDB45 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -293,6 +340,24 @@ /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ + 24B0641C2B7F0323007ABBB8 /* CoreHapticsWrapper visionOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 24B0643D2B7F0323007ABBB8 /* Build configuration list for PBXNativeTarget "CoreHapticsWrapper visionOS" */; + buildPhases = ( + 24B0641D2B7F0323007ABBB8 /* Headers */, + 24B064202B7F0323007ABBB8 /* Sources */, + 24B064382B7F0323007ABBB8 /* Frameworks */, + 24B0643B2B7F0323007ABBB8 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "CoreHapticsWrapper visionOS"; + productName = GameControllerWrapper; + productReference = 24B064402B7F0323007ABBB8 /* CoreHapticsWrapper.framework */; + productType = "com.apple.product-type.framework"; + }; 7A55184524E2FC09004CDB45 /* CoreHapticsWrapper iOS */ = { isa = PBXNativeTarget; buildConfigurationList = 7A55184E24E2FC09004CDB45 /* Build configuration list for PBXNativeTarget "CoreHapticsWrapper iOS" */; @@ -381,12 +446,20 @@ targets = ( 7A55184524E2FC09004CDB45 /* CoreHapticsWrapper iOS */, 7AE5BB732502C06C00BDBEDA /* CoreHapticsWrapper tvOS */, + 24B0641C2B7F0323007ABBB8 /* CoreHapticsWrapper visionOS */, 7A55185424E2FF56004CDB45 /* CoreHapticsWrapperMac */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + 24B0643B2B7F0323007ABBB8 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 7A55184424E2FC09004CDB45 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -411,6 +484,36 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + 24B064202B7F0323007ABBB8 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 24B064212B7F0323007ABBB8 /* UIFBG_Protocol.swift in Sources */, + 24B064222B7F0323007ABBB8 /* General_CallbackTypeDefinitions.swift in Sources */, + 24B064232B7F0323007ABBB8 /* CHHapticAdvancedPatternPlayer_Protocol.swift in Sources */, + 24B064242B7F0323007ABBB8 /* CHHapticPatternPlayer_Protocol.swift in Sources */, + 24B064252B7F0323007ABBB8 /* CHHapticAdvancedPatternPlayer_Unsupported.swift in Sources */, + 24B064262B7F0323007ABBB8 /* CHHapticPatternPlayer.swift in Sources */, + 24B064272B7F0323007ABBB8 /* CHHapticEngine_Unsupported.swift in Sources */, + 24B064282B7F0323007ABBB8 /* Utilities.swift in Sources */, + 24B064292B7F0323007ABBB8 /* UIFBG_Supported.swift in Sources */, + 24B0642A2B7F0323007ABBB8 /* CHHapticEngine_Supported.swift in Sources */, + 24B0642B2B7F0323007ABBB8 /* Extensions.swift in Sources */, + 24B0642C2B7F0323007ABBB8 /* CHCapabilities_Supported.swift in Sources */, + 24B0642D2B7F0323007ABBB8 /* UIFBG_Unsupported.swift in Sources */, + 24B0642E2B7F0323007ABBB8 /* CHHapticPatternPlayer_Supported.swift in Sources */, + 24B0642F2B7F0323007ABBB8 /* CHHapticEngine.swift in Sources */, + 24B064302B7F0323007ABBB8 /* CHHapticPatternPlayer_Unsupported.swift in Sources */, + 24B064312B7F0323007ABBB8 /* CHHapticAdvancedPatternPlayer.swift in Sources */, + 24B064322B7F0323007ABBB8 /* CHCapabilities_Unsupported.swift in Sources */, + 24B064332B7F0323007ABBB8 /* UIFBG.swift in Sources */, + 24B064342B7F0323007ABBB8 /* CHCapabilities_Protocol.swift in Sources */, + 24B064352B7F0323007ABBB8 /* CHHapticAdvancedPatternPlayer_Supported.swift in Sources */, + 24B064362B7F0323007ABBB8 /* CHHapticEngine_Protocol.swift in Sources */, + 24B064372B7F0323007ABBB8 /* CHCapabilities.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 7A55184224E2FC09004CDB45 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -504,6 +607,71 @@ /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ + 24B0643E2B7F0323007ABBB8 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 240646132B61FFCD00246067 /* CoreHaptics.xcconfig */; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Manual; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 10.15; + PRODUCT_BUNDLE_IDENTIFIER = "com.apple-plugins.CoreHapticsWrapper-visionOS"; + PRODUCT_NAME = CoreHapticsWrapper; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = xros; + SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = NO; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 7; + TVOS_DEPLOYMENT_TARGET = 13.0; + }; + name = Debug; + }; + 24B0643F2B7F0323007ABBB8 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 240646132B61FFCD00246067 /* CoreHaptics.xcconfig */; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Manual; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 10.15; + PRODUCT_BUNDLE_IDENTIFIER = "com.apple-plugins.CoreHapticsWrapper-visionOS"; + PRODUCT_NAME = CoreHapticsWrapper; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = xros; + SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 7; + TVOS_DEPLOYMENT_TARGET = 13.0; + }; + name = Release; + }; 7A55184C24E2FC09004CDB45 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 240646132B61FFCD00246067 /* CoreHaptics.xcconfig */; @@ -557,6 +725,10 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = CoreHapticsWrapper/Info.plist; + INFOPLIST_KEY_NSHumanReadableCopyright = "\"Copyright © 2021 - 2024 Apple, Inc. All rights reserved.\""; + INFOPLIST_OUTPUT_FORMAT = XML; IPHONEOS_DEPLOYMENT_TARGET = 13.6; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; @@ -616,6 +788,10 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = CoreHapticsWrapper/Info.plist; + INFOPLIST_KEY_NSHumanReadableCopyright = "\"Copyright © 2021 - 2024 Apple, Inc. All rights reserved.\""; + INFOPLIST_OUTPUT_FORMAT = XML; IPHONEOS_DEPLOYMENT_TARGET = 13.6; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; @@ -640,8 +816,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = CoreHapticsWrapper/Info.plist; - INFOPLIST_OUTPUT_FORMAT = XML; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -674,8 +848,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = CoreHapticsWrapper/Info.plist; - INFOPLIST_OUTPUT_FORMAT = XML; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -768,8 +940,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = CoreHapticsWrapper/Info.plist; - INFOPLIST_OUTPUT_FORMAT = XML; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -803,8 +973,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = CoreHapticsWrapper/Info.plist; - INFOPLIST_OUTPUT_FORMAT = XML; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -828,6 +996,15 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 24B0643D2B7F0323007ABBB8 /* Build configuration list for PBXNativeTarget "CoreHapticsWrapper visionOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 24B0643E2B7F0323007ABBB8 /* Debug */, + 24B0643F2B7F0323007ABBB8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 7A55184024E2FC09004CDB45 /* Build configuration list for PBXProject "CoreHapticsWrapper" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/plug-ins/Apple.CoreHaptics/Native/CoreHapticsWrapper.xcodeproj/xcshareddata/xcschemes/visionOS - Debug.xcscheme b/plug-ins/Apple.CoreHaptics/Native/CoreHapticsWrapper.xcodeproj/xcshareddata/xcschemes/visionOS - Debug.xcscheme new file mode 100644 index 00000000..0cdc0892 --- /dev/null +++ b/plug-ins/Apple.CoreHaptics/Native/CoreHapticsWrapper.xcodeproj/xcshareddata/xcschemes/visionOS - Debug.xcscheme @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plug-ins/Apple.CoreHaptics/Native/CoreHapticsWrapper.xcodeproj/xcshareddata/xcschemes/visionOS - Release.xcscheme b/plug-ins/Apple.CoreHaptics/Native/CoreHapticsWrapper.xcodeproj/xcshareddata/xcschemes/visionOS - Release.xcscheme new file mode 100644 index 00000000..594f9bba --- /dev/null +++ b/plug-ins/Apple.CoreHaptics/Native/CoreHapticsWrapper.xcodeproj/xcshareddata/xcschemes/visionOS - Release.xcscheme @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plug-ins/Apple.CoreHaptics/Native/CoreHapticsWrapper/CoreHapticsWrapper.h b/plug-ins/Apple.CoreHaptics/Native/CoreHapticsWrapper/CoreHapticsWrapper.h index e2c5f846..b24ebf85 100644 --- a/plug-ins/Apple.CoreHaptics/Native/CoreHapticsWrapper/CoreHapticsWrapper.h +++ b/plug-ins/Apple.CoreHaptics/Native/CoreHapticsWrapper/CoreHapticsWrapper.h @@ -14,7 +14,7 @@ FOUNDATION_EXPORT double CoreHapticsWrapperVersionNumber; FOUNDATION_EXPORT const unsigned char CoreHapticsWrapperVersionString[]; //! iOS & tvOS Frameworks do not support bridging headers... -#if TARGET_OS_IOS || TARGET_OS_TV +#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION #include typedef struct { diff --git a/plug-ins/Apple.GameController/Apple.GameController_Unity/Assets/Apple.GameController/CHANGELOG.md b/plug-ins/Apple.GameController/Apple.GameController_Unity/Assets/Apple.GameController/CHANGELOG.md index 60f8bbc3..f8b3f7bd 100644 --- a/plug-ins/Apple.GameController/Apple.GameController_Unity/Assets/Apple.GameController/CHANGELOG.md +++ b/plug-ins/Apple.GameController/Apple.GameController_Unity/Assets/Apple.GameController/CHANGELOG.md @@ -1,6 +1,10 @@ # CHANGELOG All notable changes to this project will be documented in this file. +## [1.2.0] - 2024-2-23 +### Added +- Support for visionOS + ## [1.1.0] - 2024-2-11 ### Updated - Adopt Apple.Core 3.0.0 diff --git a/plug-ins/Apple.GameController/Apple.GameController_Unity/Assets/Apple.GameController/Editor/AppleGameControllerBuildStep.cs b/plug-ins/Apple.GameController/Apple.GameController_Unity/Assets/Apple.GameController/Editor/AppleGameControllerBuildStep.cs index a27db605..f58fee87 100644 --- a/plug-ins/Apple.GameController/Apple.GameController_Unity/Assets/Apple.GameController/Editor/AppleGameControllerBuildStep.cs +++ b/plug-ins/Apple.GameController/Apple.GameController_Unity/Assets/Apple.GameController/Editor/AppleGameControllerBuildStep.cs @@ -4,7 +4,7 @@ using UnityEditor; using UnityEngine; -#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) using UnityEditor.iOS.Xcode; #endif @@ -17,8 +17,8 @@ public class AppleGameControllerBuildStep : AppleBuildStep public bool SupportsExtendedGamePad => true; public override string DisplayName => "Apple.GameController"; - public override BuildTarget[] SupportedTargets => new BuildTarget[] {BuildTarget.iOS, BuildTarget.tvOS, BuildTarget.StandaloneOSX}; -#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) + public override BuildTarget[] SupportedTargets => new BuildTarget[] {BuildTarget.iOS, BuildTarget.tvOS, BuildTarget.StandaloneOSX, BuildTarget.VisionOS}; +#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) public override void OnProcessInfoPlist(AppleBuildProfile _, BuildTarget buildTarget, string pathToBuiltTarget, PlistDocument infoPlist) { // Notify that we support controllers @@ -30,7 +30,7 @@ public override void OnProcessInfoPlist(AppleBuildProfile _, BuildTarget buildTa // Support device profiles PlistElementArray supportedControllers = null; - if (buildTarget == BuildTarget.iOS || buildTarget == BuildTarget.StandaloneOSX) + if (buildTarget == BuildTarget.iOS || buildTarget == BuildTarget.StandaloneOSX || buildTarget == BuildTarget.VisionOS) { supportedControllers = infoPlist.root.CreateArray("GCSupportedGameControllers"); } @@ -66,6 +66,6 @@ public override void OnProcessFrameworks(AppleBuildProfile _, BuildTarget buildT Debug.LogWarning($"[{DisplayName}] No native library defined for Unity build target {buildTarget.ToString()}. Skipping."); } } -#endif // (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#endif // (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) } } diff --git a/plug-ins/Apple.GameController/Apple.GameController_Unity/Assets/Apple.GameController/Source/InteropUtility.cs b/plug-ins/Apple.GameController/Apple.GameController_Unity/Assets/Apple.GameController/Source/InteropUtility.cs index 3a888e6a..c232f367 100644 --- a/plug-ins/Apple.GameController/Apple.GameController_Unity/Assets/Apple.GameController/Source/InteropUtility.cs +++ b/plug-ins/Apple.GameController/Apple.GameController_Unity/Assets/Apple.GameController/Source/InteropUtility.cs @@ -2,7 +2,7 @@ { internal static class InteropUtility { -#if UNITY_IOS || UNITY_TVOS +#if (UNITY_IOS || UNITY_TVOS || UNITY_VISIONOS) && !UNITY_EDITOR public const string DLLName = "__Internal"; #else public const string DLLName = "GameControllerWrapper"; diff --git a/plug-ins/Apple.GameController/Apple.GameController_Unity/Assets/Apple.GameController/package.json b/plug-ins/Apple.GameController/Apple.GameController_Unity/Assets/Apple.GameController/package.json index 25695b54..f098f20a 100644 --- a/plug-ins/Apple.GameController/Apple.GameController_Unity/Assets/Apple.GameController/package.json +++ b/plug-ins/Apple.GameController/Apple.GameController_Unity/Assets/Apple.GameController/package.json @@ -2,10 +2,10 @@ "name": "com.apple.unityplugin.gamecontroller", "displayName": "Apple.GameController", "description": "Exposes Apple's GameController.framework to Unity developers via c# script API.", - "version": "1.1.0", + "version": "1.2.0", "unity": "2022.3", "dependencies": { - "com.apple.unityplugin.core": "3.0.0" + "com.apple.unityplugin.core": "3.1.0" }, "keywords": [ "controller", diff --git a/plug-ins/Apple.GameController/Apple.GameController_Unity/ProjectSettings/ProjectSettings.asset b/plug-ins/Apple.GameController/Apple.GameController_Unity/ProjectSettings/ProjectSettings.asset index c6e9be51..57de1cbe 100644 --- a/plug-ins/Apple.GameController/Apple.GameController_Unity/ProjectSettings/ProjectSettings.asset +++ b/plug-ins/Apple.GameController/Apple.GameController_Unity/ProjectSettings/ProjectSettings.asset @@ -191,7 +191,7 @@ PlayerSettings: tvOSSdkVersion: 0 tvOSRequireExtendedGameController: 0 tvOSTargetOSVersionString: 12.0 - VisionOSSdkVersion: 0 + VisionOSSdkVersion: 1 VisionOSTargetOSVersionString: 1.0 uIPrerenderedIcon: 0 uIRequiresPersistentWiFi: 0 diff --git a/plug-ins/Apple.GameController/Native/GameControllerWrapper.xcodeproj/project.pbxproj b/plug-ins/Apple.GameController/Native/GameControllerWrapper.xcodeproj/project.pbxproj index 0f164282..27381181 100644 --- a/plug-ins/Apple.GameController/Native/GameControllerWrapper.xcodeproj/project.pbxproj +++ b/plug-ins/Apple.GameController/Native/GameControllerWrapper.xcodeproj/project.pbxproj @@ -7,6 +7,13 @@ objects = { /* Begin PBXBuildFile section */ + 24B064462B7F1332007ABBB8 /* GameControllerWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A55184924E2FC09004CDB45 /* GameControllerWrapper.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 24B064472B7F1332007ABBB8 /* Controller_BridgingHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A55185F24E6FA7F004CDB45 /* Controller_BridgingHeader.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 24B064492B7F1332007ABBB8 /* General_CallbackTypeDefinitions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A55186124E6FBA0004CDB45 /* General_CallbackTypeDefinitions.swift */; }; + 24B0644A2B7F1332007ABBB8 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A55186624E70042004CDB45 /* Extensions.swift */; }; + 24B0644B2B7F1332007ABBB8 /* Controller.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A55185C24E6FA61004CDB45 /* Controller.swift */; }; + 24B0644C2B7F1332007ABBB8 /* ControllerDictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A849D7D2548CB1C00EF55D8 /* ControllerDictionary.swift */; }; + 24B0644D2B7F1332007ABBB8 /* ControllerHaptics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AB23DF724E72E2300596226 /* ControllerHaptics.swift */; }; 7A55184B24E2FC09004CDB45 /* GameControllerWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A55184924E2FC09004CDB45 /* GameControllerWrapper.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7A55185D24E6FA61004CDB45 /* Controller.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A55185C24E6FA61004CDB45 /* Controller.swift */; }; 7A55185E24E6FA61004CDB45 /* Controller.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A55185C24E6FA61004CDB45 /* Controller.swift */; }; @@ -32,6 +39,7 @@ /* Begin PBXFileReference section */ 240646142B62D48400246067 /* GameController.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = GameController.xcconfig; sourceTree = ""; }; + 24B064542B7F1332007ABBB8 /* GameControllerWrapper.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = GameControllerWrapper.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 7A55184624E2FC09004CDB45 /* GameControllerWrapper.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = GameControllerWrapper.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 7A55184924E2FC09004CDB45 /* GameControllerWrapper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GameControllerWrapper.h; sourceTree = ""; }; 7A55184A24E2FC09004CDB45 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -47,6 +55,13 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 24B0644E2B7F1332007ABBB8 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 7A55184324E2FC09004CDB45 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -86,6 +101,7 @@ 7A55184624E2FC09004CDB45 /* GameControllerWrapper.framework */, 7A55185524E2FF56004CDB45 /* GameControllerWrapper.bundle */, 7AE5BB812502C06C00BDBEDA /* GameControllerWrapper.framework */, + 24B064542B7F1332007ABBB8 /* GameControllerWrapper.framework */, ); name = Products; sourceTree = ""; @@ -117,6 +133,15 @@ /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ + 24B064452B7F1332007ABBB8 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 24B064462B7F1332007ABBB8 /* GameControllerWrapper.h in Headers */, + 24B064472B7F1332007ABBB8 /* Controller_BridgingHeader.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 7A55184124E2FC09004CDB45 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -147,6 +172,24 @@ /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ + 24B064442B7F1332007ABBB8 /* GameControllerWrapper_visionOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 24B064512B7F1332007ABBB8 /* Build configuration list for PBXNativeTarget "GameControllerWrapper_visionOS" */; + buildPhases = ( + 24B064452B7F1332007ABBB8 /* Headers */, + 24B064482B7F1332007ABBB8 /* Sources */, + 24B0644E2B7F1332007ABBB8 /* Frameworks */, + 24B0644F2B7F1332007ABBB8 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = GameControllerWrapper_visionOS; + productName = GameControllerWrapper; + productReference = 24B064542B7F1332007ABBB8 /* GameControllerWrapper.framework */; + productType = "com.apple.product-type.framework"; + }; 7A55184524E2FC09004CDB45 /* GameControllerWrapper_iOS */ = { isa = PBXNativeTarget; buildConfigurationList = 7A55184E24E2FC09004CDB45 /* Build configuration list for PBXNativeTarget "GameControllerWrapper_iOS" */; @@ -235,12 +278,20 @@ targets = ( 7A55184524E2FC09004CDB45 /* GameControllerWrapper_iOS */, 7AE5BB732502C06C00BDBEDA /* GameControllerWrapper_tvOS */, + 24B064442B7F1332007ABBB8 /* GameControllerWrapper_visionOS */, 7A55185424E2FF56004CDB45 /* GameControllerWrapper_macOS */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + 24B0644F2B7F1332007ABBB8 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 7A55184424E2FC09004CDB45 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -265,6 +316,18 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + 24B064482B7F1332007ABBB8 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 24B064492B7F1332007ABBB8 /* General_CallbackTypeDefinitions.swift in Sources */, + 24B0644A2B7F1332007ABBB8 /* Extensions.swift in Sources */, + 24B0644B2B7F1332007ABBB8 /* Controller.swift in Sources */, + 24B0644C2B7F1332007ABBB8 /* ControllerDictionary.swift in Sources */, + 24B0644D2B7F1332007ABBB8 /* ControllerHaptics.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 7A55184224E2FC09004CDB45 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -304,6 +367,73 @@ /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ + 24B064522B7F1332007ABBB8 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 240646142B62D48400246067 /* GameController.xcconfig */; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 10.15; + PRODUCT_BUNDLE_IDENTIFIER = "com.apple-plugins.GameControllerWrapper-visionOS"; + PRODUCT_NAME = GameControllerWrapper; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = xros; + SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = NO; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 7; + TVOS_DEPLOYMENT_TARGET = 13.0; + WATCHOS_DEPLOYMENT_TARGET = ""; + }; + name = Debug; + }; + 24B064532B7F1332007ABBB8 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 240646142B62D48400246067 /* GameController.xcconfig */; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 10.15; + PRODUCT_BUNDLE_IDENTIFIER = "com.apple-plugins.GameControllerWrapper-visionOS"; + PRODUCT_NAME = GameControllerWrapper; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = xros; + SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 7; + TVOS_DEPLOYMENT_TARGET = 13.0; + WATCHOS_DEPLOYMENT_TARGET = ""; + }; + name = Release; + }; 7A55184C24E2FC09004CDB45 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 240646142B62D48400246067 /* GameController.xcconfig */; @@ -358,6 +488,9 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ""; + INFOPLIST_FILE = GameControllerWrapper/Info.plist; + INFOPLIST_KEY_NSHumanReadableCopyright = "\"Copyright © 2021 - 2024 Apple, Inc. All rights reserved.\""; + INFOPLIST_OUTPUT_FORMAT = XML; IPHONEOS_DEPLOYMENT_TARGET = 13.6; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; @@ -418,6 +551,9 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ""; + INFOPLIST_FILE = GameControllerWrapper/Info.plist; + INFOPLIST_KEY_NSHumanReadableCopyright = "\"Copyright © 2021 - 2024 Apple, Inc. All rights reserved.\""; + INFOPLIST_OUTPUT_FORMAT = XML; IPHONEOS_DEPLOYMENT_TARGET = 13.6; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; @@ -442,8 +578,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = GameControllerWrapper/Info.plist; - INFOPLIST_OUTPUT_FORMAT = XML; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -475,8 +609,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = GameControllerWrapper/Info.plist; - INFOPLIST_OUTPUT_FORMAT = XML; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -504,8 +636,6 @@ CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; DEVELOPMENT_TEAM = ""; - INFOPLIST_FILE = GameControllerWrapper/Info.plist; - INFOPLIST_OUTPUT_FORMAT = XML; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -536,8 +666,6 @@ CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; DEVELOPMENT_TEAM = ""; - INFOPLIST_FILE = GameControllerWrapper/Info.plist; - INFOPLIST_OUTPUT_FORMAT = XML; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -570,8 +698,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = GameControllerWrapper/Info.plist; - INFOPLIST_OUTPUT_FORMAT = XML; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -604,8 +730,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = GameControllerWrapper/Info.plist; - INFOPLIST_OUTPUT_FORMAT = XML; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -628,6 +752,15 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 24B064512B7F1332007ABBB8 /* Build configuration list for PBXNativeTarget "GameControllerWrapper_visionOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 24B064522B7F1332007ABBB8 /* Debug */, + 24B064532B7F1332007ABBB8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 7A55184024E2FC09004CDB45 /* Build configuration list for PBXProject "GameControllerWrapper" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/plug-ins/Apple.GameController/Native/GameControllerWrapper.xcodeproj/xcshareddata/xcschemes/visionOS - Debug.xcscheme b/plug-ins/Apple.GameController/Native/GameControllerWrapper.xcodeproj/xcshareddata/xcschemes/visionOS - Debug.xcscheme new file mode 100644 index 00000000..6baac4d7 --- /dev/null +++ b/plug-ins/Apple.GameController/Native/GameControllerWrapper.xcodeproj/xcshareddata/xcschemes/visionOS - Debug.xcscheme @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plug-ins/Apple.GameController/Native/GameControllerWrapper.xcodeproj/xcshareddata/xcschemes/visionOS - Release.xcscheme b/plug-ins/Apple.GameController/Native/GameControllerWrapper.xcodeproj/xcshareddata/xcschemes/visionOS - Release.xcscheme new file mode 100644 index 00000000..fdfb9dd3 --- /dev/null +++ b/plug-ins/Apple.GameController/Native/GameControllerWrapper.xcodeproj/xcshareddata/xcschemes/visionOS - Release.xcscheme @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plug-ins/Apple.GameController/Native/GameControllerWrapper/GameControllerWrapper.h b/plug-ins/Apple.GameController/Native/GameControllerWrapper/GameControllerWrapper.h index e6a14ba9..768902ea 100644 --- a/plug-ins/Apple.GameController/Native/GameControllerWrapper/GameControllerWrapper.h +++ b/plug-ins/Apple.GameController/Native/GameControllerWrapper/GameControllerWrapper.h @@ -16,7 +16,7 @@ FOUNDATION_EXPORT const unsigned char GameControllerWrapperVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import //! iOS & tvOS Frameworks do not support bridging headers... -#if TARGET_OS_IOS || TARGET_OS_TV +#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION #include typedef struct { diff --git a/plug-ins/Apple.GameKit/Apple.GameKit_Unity/Assets/Apple.GameKit/CHANGELOG.md b/plug-ins/Apple.GameKit/Apple.GameKit_Unity/Assets/Apple.GameKit/CHANGELOG.md index 4fc2bca6..c56ea573 100644 --- a/plug-ins/Apple.GameKit/Apple.GameKit_Unity/Assets/Apple.GameKit/CHANGELOG.md +++ b/plug-ins/Apple.GameKit/Apple.GameKit_Unity/Assets/Apple.GameKit/CHANGELOG.md @@ -1,6 +1,10 @@ # CHANGELOG All notable changes to this project will be documented in this file. +## [2.2.0] - 2023-02-23 +### Added +- Support for visionOS + ## [2.1.0] - 2023-02-15 ### Updated - Adopt Apple.Core 3.0.0 diff --git a/plug-ins/Apple.GameKit/Apple.GameKit_Unity/Assets/Apple.GameKit/Demos/Apple.GameKit.Sample/Apple.Arcade.GameKit.Sample.asmdef b/plug-ins/Apple.GameKit/Apple.GameKit_Unity/Assets/Apple.GameKit/Demos/Apple.GameKit.Sample/Apple.Arcade.GameKit.Sample.asmdef index d2deddde..b4e044a6 100644 --- a/plug-ins/Apple.GameKit/Apple.GameKit_Unity/Assets/Apple.GameKit/Demos/Apple.GameKit.Sample/Apple.Arcade.GameKit.Sample.asmdef +++ b/plug-ins/Apple.GameKit/Apple.GameKit_Unity/Assets/Apple.GameKit/Demos/Apple.GameKit.Sample/Apple.Arcade.GameKit.Sample.asmdef @@ -9,7 +9,8 @@ "Editor", "iOS", "macOSStandalone", - "tvOS" + "tvOS", + "VisionOS" ], "excludePlatforms": [], "allowUnsafeCode": false, diff --git a/plug-ins/Apple.GameKit/Apple.GameKit_Unity/Assets/Apple.GameKit/Editor/AppleGameKitBuildStep.cs b/plug-ins/Apple.GameKit/Apple.GameKit_Unity/Assets/Apple.GameKit/Editor/AppleGameKitBuildStep.cs index 50d07e4a..ce339dd9 100644 --- a/plug-ins/Apple.GameKit/Apple.GameKit_Unity/Assets/Apple.GameKit/Editor/AppleGameKitBuildStep.cs +++ b/plug-ins/Apple.GameKit/Apple.GameKit_Unity/Assets/Apple.GameKit/Editor/AppleGameKitBuildStep.cs @@ -4,7 +4,7 @@ using UnityEditor; using UnityEngine; -#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) using UnityEditor.iOS.Xcode; #endif @@ -13,12 +13,12 @@ namespace Apple.GameKit.Editor public class AppleGameKitBuildStep : AppleBuildStep { public override string DisplayName => "Apple.GameKit"; - public override BuildTarget[] SupportedTargets => new BuildTarget[] {BuildTarget.iOS, BuildTarget.tvOS, BuildTarget.StandaloneOSX}; + public override BuildTarget[] SupportedTargets => new BuildTarget[] {BuildTarget.iOS, BuildTarget.tvOS, BuildTarget.StandaloneOSX, BuildTarget.VisionOS}; [Tooltip("A message that tells the user why the app needs access to their Game Center friends list.")] public string FriendListUsageDescription; -#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) public override void OnProcessEntitlements(AppleBuildProfile _, BuildTarget buildTarget, string _1, PlistDocument entitlements) { entitlements.root.SetBoolean("com.apple.developer.game-center", true); diff --git a/plug-ins/Apple.GameKit/Apple.GameKit_Unity/Assets/Apple.GameKit/Source/Apple.GameKit.asmdef b/plug-ins/Apple.GameKit/Apple.GameKit_Unity/Assets/Apple.GameKit/Source/Apple.GameKit.asmdef index 6b1bb4af..79601579 100644 --- a/plug-ins/Apple.GameKit/Apple.GameKit_Unity/Assets/Apple.GameKit/Source/Apple.GameKit.asmdef +++ b/plug-ins/Apple.GameKit/Apple.GameKit_Unity/Assets/Apple.GameKit/Source/Apple.GameKit.asmdef @@ -8,7 +8,8 @@ "Editor", "iOS", "macOSStandalone", - "tvOS" + "tvOS", + "VisionOS" ], "excludePlatforms": [], "allowUnsafeCode": false, diff --git a/plug-ins/Apple.GameKit/Apple.GameKit_Unity/Assets/Apple.GameKit/Source/InteropUtility.cs b/plug-ins/Apple.GameKit/Apple.GameKit_Unity/Assets/Apple.GameKit/Source/InteropUtility.cs index c0f5b91f..ab5f2884 100644 --- a/plug-ins/Apple.GameKit/Apple.GameKit_Unity/Assets/Apple.GameKit/Source/InteropUtility.cs +++ b/plug-ins/Apple.GameKit/Apple.GameKit_Unity/Assets/Apple.GameKit/Source/InteropUtility.cs @@ -6,7 +6,7 @@ namespace Apple.GameKit { internal static class InteropUtility { -#if UNITY_IOS || UNITY_TVOS +#if (UNITY_IOS || UNITY_TVOS || UNITY_VISIONOS) && !UNITY_EDITOR public const string DLLName = "__Internal"; #else public const string DLLName = "GameKitWrapper"; diff --git a/plug-ins/Apple.GameKit/Apple.GameKit_Unity/Assets/Apple.GameKit/package.json b/plug-ins/Apple.GameKit/Apple.GameKit_Unity/Assets/Apple.GameKit/package.json index 5d25bb3b..80ed6812 100644 --- a/plug-ins/Apple.GameKit/Apple.GameKit_Unity/Assets/Apple.GameKit/package.json +++ b/plug-ins/Apple.GameKit/Apple.GameKit_Unity/Assets/Apple.GameKit/package.json @@ -2,10 +2,10 @@ "name": "com.apple.unityplugin.gamekit", "displayName": "Apple.GameKit", "description": "Exposes Apple's GameKit.framework to Unity developers via C# script API", - "version": "2.1.0", + "version": "2.2.0", "unity": "2022.3", "dependencies": { - "com.apple.unityplugin.core": "3.0.0" + "com.apple.unityplugin.core": "3.1.0" }, "keywords": [ "gamekit", diff --git a/plug-ins/Apple.GameKit/Apple.GameKit_Unity/ProjectSettings/ProjectSettings.asset b/plug-ins/Apple.GameKit/Apple.GameKit_Unity/ProjectSettings/ProjectSettings.asset index 71ae0b18..5ce7f64a 100644 --- a/plug-ins/Apple.GameKit/Apple.GameKit_Unity/ProjectSettings/ProjectSettings.asset +++ b/plug-ins/Apple.GameKit/Apple.GameKit_Unity/ProjectSettings/ProjectSettings.asset @@ -189,7 +189,7 @@ PlayerSettings: tvOSSdkVersion: 0 tvOSRequireExtendedGameController: 0 tvOSTargetOSVersionString: 12.0 - VisionOSSdkVersion: 0 + VisionOSSdkVersion: 1 VisionOSTargetOSVersionString: 1.0 uIPrerenderedIcon: 0 uIRequiresPersistentWiFi: 0 diff --git a/plug-ins/Apple.GameKit/Native/GameKitWrapper.xcodeproj/project.pbxproj b/plug-ins/Apple.GameKit/Native/GameKitWrapper.xcodeproj/project.pbxproj index 00c92c14..092838c2 100644 --- a/plug-ins/Apple.GameKit/Native/GameKitWrapper.xcodeproj/project.pbxproj +++ b/plug-ins/Apple.GameKit/Native/GameKitWrapper.xcodeproj/project.pbxproj @@ -7,6 +7,45 @@ objects = { /* Begin PBXBuildFile section */ + 24B0645A2B7F29E1007ABBB8 /* GameKitWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A9B815624A4FC3800FB2FE8 /* GameKitWrapper.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 24B0645B2B7F29E1007ABBB8 /* GKErrorCodeExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = FB7384C92ADE05A200616362 /* GKErrorCodeExtension.h */; }; + 24B0645C2B7F29E1007ABBB8 /* AppleCoreRuntimeShared.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A486BA926A09D7A00255BD5 /* AppleCoreRuntimeShared.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 24B0645D2B7F29E1007ABBB8 /* AccessPoint_BridgingHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A7D6B7F25D6E7650072DB37 /* AccessPoint_BridgingHeader.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 24B0645F2B7F29E1007ABBB8 /* GKAchievementDescription.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AA8AD602729F3D100D3F909 /* GKAchievementDescription.swift */; }; + 24B064602B7F29E1007ABBB8 /* GKMatchedPlayers.m in Sources */ = {isa = PBXBuildFile; fileRef = FB8694482AD73AE5009B8676 /* GKMatchedPlayers.m */; }; + 24B064612B7F29E1007ABBB8 /* GKLeaderboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AA8AD6F2729F9E200D3F909 /* GKLeaderboard.swift */; }; + 24B064622B7F29E1007ABBB8 /* GKTurnBasedMatchmakerViewControllerDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AA8ADBF272B0A3900D3F909 /* GKTurnBasedMatchmakerViewControllerDelegate.swift */; }; + 24B064632B7F29E1007ABBB8 /* GKChallengeDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AA8ADC4272B0EE900D3F909 /* GKChallengeDelegate.swift */; }; + 24B064642B7F29E1007ABBB8 /* GKMatchDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AA8AD83272A0E0800D3F909 /* GKMatchDelegate.swift */; }; + 24B064652B7F29E1007ABBB8 /* GKMatchmakerViewControllerDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AA8AD92272A41DC00D3F909 /* GKMatchmakerViewControllerDelegate.swift */; }; + 24B064662B7F29E1007ABBB8 /* GKInvite.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AA8AD6A2729F86D00D3F909 /* GKInvite.swift */; }; + 24B064672B7F29E1007ABBB8 /* GKChallenge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AA8AD652729F5D600D3F909 /* GKChallenge.swift */; }; + 24B064682B7F29E1007ABBB8 /* GKTurnBasedParticipant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AA8AD97272A458400D3F909 /* GKTurnBasedParticipant.swift */; }; + 24B064692B7F29E1007ABBB8 /* GKLocalPlayerListener.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AA8ADB5272B02E500D3F909 /* GKLocalPlayerListener.swift */; }; + 24B0646A2B7F29E1007ABBB8 /* GKGameCenterViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A894465272F2C7D0008D820 /* GKGameCenterViewController.swift */; }; + 24B0646B2B7F29E1007ABBB8 /* AccessPoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A4ADFE924DDF23400664BD3 /* AccessPoint.swift */; }; + 24B0646C2B7F29E1007ABBB8 /* GKBasePlayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A630054271F30EC00C40BC1 /* GKBasePlayer.swift */; }; + 24B0646D2B7F29E1007ABBB8 /* GKAchievementChallenge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A89445D272DECBA0008D820 /* GKAchievementChallenge.swift */; }; + 24B0646E2B7F29E1007ABBB8 /* GKLeaderboardEntry.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AA8ADCE272B2D0A00D3F909 /* GKLeaderboardEntry.swift */; }; + 24B0646F2B7F29E1007ABBB8 /* GKTurnBasedExchangeReply.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AA8ADA6272AF66300D3F909 /* GKTurnBasedExchangeReply.swift */; }; + 24B064702B7F29E1007ABBB8 /* GKTurnBasedMatchmakerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AA8ADBA272B077C00D3F909 /* GKTurnBasedMatchmakerViewController.swift */; }; + 24B064712B7F29E1007ABBB8 /* AppleCoreRuntimeShared.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A486BAE26A09E7A00255BD5 /* AppleCoreRuntimeShared.swift */; }; + 24B064722B7F29E1007ABBB8 /* GKMatchmaker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A63004F271F25BE00C40BC1 /* GKMatchmaker.swift */; }; + 24B064732B7F29E1007ABBB8 /* GKTurnBasedExchange.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AA8ADA1272AF2B100D3F909 /* GKTurnBasedExchange.swift */; }; + 24B064742B7F29E1007ABBB8 /* GKNotificationBanner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A3E81F626F27BD800B102BB /* GKNotificationBanner.swift */; }; + 24B064752B7F29E1007ABBB8 /* GKScoreChallenge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A894459272DEC460008D820 /* GKScoreChallenge.swift */; }; + 24B064762B7F29E1007ABBB8 /* GKLocalPlayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A63005E271F336800C40BC1 /* GKLocalPlayer.swift */; }; + 24B064772B7F29E1007ABBB8 /* GKLeaderboardSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AA8AD74272A00FA00D3F909 /* GKLeaderboardSet.swift */; }; + 24B064782B7F29E1007ABBB8 /* GKMatchRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AA8AD88272A3A6E00D3F909 /* GKMatchRequest.swift */; }; + 24B064792B7F29E1007ABBB8 /* GKMatch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AA8AD7E272A0B2100D3F909 /* GKMatch.swift */; }; + 24B0647A2B7F29E1007ABBB8 /* GKAchievement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AA8AD5B2729EF5500D3F909 /* GKAchievement.swift */; }; + 24B0647B2B7F29E1007ABBB8 /* GKVoiceChat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AA8AD9C272A46AF00D3F909 /* GKVoiceChat.swift */; }; + 24B0647C2B7F29E1007ABBB8 /* GKTurnBasedMatchDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AA8ADB0272B02AF00D3F909 /* GKTurnBasedMatchDelegate.swift */; }; + 24B0647D2B7F29E1007ABBB8 /* GKTurnBasedMatch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AA8ADAB272AF7A000D3F909 /* GKTurnBasedMatch.swift */; }; + 24B0647E2B7F29E1007ABBB8 /* GKMatchmakerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AA8AD8D272A3EE600D3F909 /* GKMatchmakerViewController.swift */; }; + 24B0647F2B7F29E1007ABBB8 /* GameKitUIDelegateHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A50579224ABD01000477507 /* GameKitUIDelegateHandler.swift */; }; + 24B064802B7F29E1007ABBB8 /* GKPlayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A630059271F315500C40BC1 /* GKPlayer.swift */; }; + 24B064812B7F29E1007ABBB8 /* GKInviteDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AA8ADC9272B10F500D3F909 /* GKInviteDelegate.swift */; }; 7A3E81F726F27BD800B102BB /* GKNotificationBanner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A3E81F626F27BD800B102BB /* GKNotificationBanner.swift */; }; 7A3E81F826F27BD800B102BB /* GKNotificationBanner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A3E81F626F27BD800B102BB /* GKNotificationBanner.swift */; }; 7A3E81F926F27BD800B102BB /* GKNotificationBanner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A3E81F626F27BD800B102BB /* GKNotificationBanner.swift */; }; @@ -128,6 +167,7 @@ /* Begin PBXFileReference section */ 240646152B62D61800246067 /* GameKit.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = GameKit.xcconfig; sourceTree = ""; }; + 24B064882B7F29E1007ABBB8 /* GameKitWrapper.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = GameKitWrapper.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 46531AD89A1A23DEFB9D6429 /* libPods-GameKitWrapperUnitTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-GameKitWrapperUnitTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 7A3E81F626F27BD800B102BB /* GKNotificationBanner.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GKNotificationBanner.swift; sourceTree = ""; }; 7A486BA926A09D7A00255BD5 /* AppleCoreRuntimeShared.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppleCoreRuntimeShared.h; sourceTree = ""; }; @@ -176,6 +216,13 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 24B064822B7F29E1007ABBB8 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 7A7E439324B508D40086FB7A /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -216,6 +263,7 @@ 7A9B815324A4FC3800FB2FE8 /* GameKitWrapper.framework */, 7A7E439624B508D40086FB7A /* GameKitWrapper.bundle */, 7AE5BBA22502C0DD00BDBEDA /* GameKitWrapper.framework */, + 24B064882B7F29E1007ABBB8 /* GameKitWrapper.framework */, ); name = Products; sourceTree = ""; @@ -279,6 +327,17 @@ /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ + 24B064592B7F29E1007ABBB8 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 24B0645A2B7F29E1007ABBB8 /* GameKitWrapper.h in Headers */, + 24B0645B2B7F29E1007ABBB8 /* GKErrorCodeExtension.h in Headers */, + 24B0645C2B7F29E1007ABBB8 /* AppleCoreRuntimeShared.h in Headers */, + 24B0645D2B7F29E1007ABBB8 /* AccessPoint_BridgingHeader.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 7A7E439C24B508E70086FB7A /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -315,6 +374,24 @@ /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ + 24B064582B7F29E1007ABBB8 /* GameKitWrapper visionOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 24B064852B7F29E1007ABBB8 /* Build configuration list for PBXNativeTarget "GameKitWrapper visionOS" */; + buildPhases = ( + 24B064592B7F29E1007ABBB8 /* Headers */, + 24B0645E2B7F29E1007ABBB8 /* Sources */, + 24B064822B7F29E1007ABBB8 /* Frameworks */, + 24B064832B7F29E1007ABBB8 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "GameKitWrapper visionOS"; + productName = GameKitWrapper; + productReference = 24B064882B7F29E1007ABBB8 /* GameKitWrapper.framework */; + productType = "com.apple.product-type.framework"; + }; 7A7E439524B508D40086FB7A /* GameKitWrapperMac */ = { isa = PBXNativeTarget; buildConfigurationList = 7A7E439924B508D40086FB7A /* Build configuration list for PBXNativeTarget "GameKitWrapperMac" */; @@ -403,12 +480,20 @@ targets = ( 7A9B815224A4FC3800FB2FE8 /* GameKitWrapper iOS */, 7AE5BB832502C0DD00BDBEDA /* GameKitWrapper tvOS */, + 24B064582B7F29E1007ABBB8 /* GameKitWrapper visionOS */, 7A7E439524B508D40086FB7A /* GameKitWrapperMac */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + 24B064832B7F29E1007ABBB8 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 7A7E439424B508D40086FB7A /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -433,6 +518,48 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + 24B0645E2B7F29E1007ABBB8 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 24B0645F2B7F29E1007ABBB8 /* GKAchievementDescription.swift in Sources */, + 24B064602B7F29E1007ABBB8 /* GKMatchedPlayers.m in Sources */, + 24B064612B7F29E1007ABBB8 /* GKLeaderboard.swift in Sources */, + 24B064622B7F29E1007ABBB8 /* GKTurnBasedMatchmakerViewControllerDelegate.swift in Sources */, + 24B064632B7F29E1007ABBB8 /* GKChallengeDelegate.swift in Sources */, + 24B064642B7F29E1007ABBB8 /* GKMatchDelegate.swift in Sources */, + 24B064652B7F29E1007ABBB8 /* GKMatchmakerViewControllerDelegate.swift in Sources */, + 24B064662B7F29E1007ABBB8 /* GKInvite.swift in Sources */, + 24B064672B7F29E1007ABBB8 /* GKChallenge.swift in Sources */, + 24B064682B7F29E1007ABBB8 /* GKTurnBasedParticipant.swift in Sources */, + 24B064692B7F29E1007ABBB8 /* GKLocalPlayerListener.swift in Sources */, + 24B0646A2B7F29E1007ABBB8 /* GKGameCenterViewController.swift in Sources */, + 24B0646B2B7F29E1007ABBB8 /* AccessPoint.swift in Sources */, + 24B0646C2B7F29E1007ABBB8 /* GKBasePlayer.swift in Sources */, + 24B0646D2B7F29E1007ABBB8 /* GKAchievementChallenge.swift in Sources */, + 24B0646E2B7F29E1007ABBB8 /* GKLeaderboardEntry.swift in Sources */, + 24B0646F2B7F29E1007ABBB8 /* GKTurnBasedExchangeReply.swift in Sources */, + 24B064702B7F29E1007ABBB8 /* GKTurnBasedMatchmakerViewController.swift in Sources */, + 24B064712B7F29E1007ABBB8 /* AppleCoreRuntimeShared.swift in Sources */, + 24B064722B7F29E1007ABBB8 /* GKMatchmaker.swift in Sources */, + 24B064732B7F29E1007ABBB8 /* GKTurnBasedExchange.swift in Sources */, + 24B064742B7F29E1007ABBB8 /* GKNotificationBanner.swift in Sources */, + 24B064752B7F29E1007ABBB8 /* GKScoreChallenge.swift in Sources */, + 24B064762B7F29E1007ABBB8 /* GKLocalPlayer.swift in Sources */, + 24B064772B7F29E1007ABBB8 /* GKLeaderboardSet.swift in Sources */, + 24B064782B7F29E1007ABBB8 /* GKMatchRequest.swift in Sources */, + 24B064792B7F29E1007ABBB8 /* GKMatch.swift in Sources */, + 24B0647A2B7F29E1007ABBB8 /* GKAchievement.swift in Sources */, + 24B0647B2B7F29E1007ABBB8 /* GKVoiceChat.swift in Sources */, + 24B0647C2B7F29E1007ABBB8 /* GKTurnBasedMatchDelegate.swift in Sources */, + 24B0647D2B7F29E1007ABBB8 /* GKTurnBasedMatch.swift in Sources */, + 24B0647E2B7F29E1007ABBB8 /* GKMatchmakerViewController.swift in Sources */, + 24B0647F2B7F29E1007ABBB8 /* GameKitUIDelegateHandler.swift in Sources */, + 24B064802B7F29E1007ABBB8 /* GKPlayer.swift in Sources */, + 24B064812B7F29E1007ABBB8 /* GKInviteDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 7A7E439224B508D40086FB7A /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -562,6 +689,79 @@ /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ + 24B064862B7F29E1007ABBB8 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 240646152B62D61800246067 /* GameKit.xcconfig */; + buildSettings = { + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; + CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Manual; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.apple-plugins.GameKitWrapper-visionOS"; + PRODUCT_NAME = GameKitWrapper; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = xros; + SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_OBJC_BRIDGING_HEADER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TVOS_DEPLOYMENT_TARGET = 13.0; + WATCHOS_DEPLOYMENT_TARGET = ""; + }; + name = Debug; + }; + 24B064872B7F29E1007ABBB8 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 240646152B62D61800246067 /* GameKit.xcconfig */; + buildSettings = { + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; + CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Manual; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.apple-plugins.GameKitWrapper-visionOS"; + PRODUCT_NAME = GameKitWrapper; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = xros; + SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_OBJC_BRIDGING_HEADER = ""; + SWIFT_VERSION = 5.0; + TVOS_DEPLOYMENT_TARGET = 13.0; + WATCHOS_DEPLOYMENT_TARGET = ""; + }; + name = Release; + }; 7A7E439A24B508D40086FB7A /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 240646152B62D61800246067 /* GameKit.xcconfig */; @@ -572,8 +772,6 @@ CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; DEVELOPMENT_TEAM = ""; - INFOPLIST_FILE = GameKitWrapper/Info.plist; - INFOPLIST_OUTPUT_FORMAT = XML; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; MACOSX_DEPLOYMENT_TARGET = 11.0; OTHER_SWIFT_FLAGS = ""; @@ -600,8 +798,6 @@ CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; DEVELOPMENT_TEAM = ""; - INFOPLIST_FILE = GameKitWrapper/Info.plist; - INFOPLIST_OUTPUT_FORMAT = XML; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; MACOSX_DEPLOYMENT_TARGET = 11.0; OTHER_SWIFT_FLAGS = ""; @@ -670,6 +866,9 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = GameKitWrapper/Info.plist; + INFOPLIST_KEY_NSHumanReadableCopyright = "\"Copyright © 2021 - 2024 Apple, Inc. All rights reserved.\""; + INFOPLIST_OUTPUT_FORMAT = XML; IPHONEOS_DEPLOYMENT_TARGET = 14.2; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; @@ -728,6 +927,9 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = GameKitWrapper/Info.plist; + INFOPLIST_KEY_NSHumanReadableCopyright = "\"Copyright © 2021 - 2024 Apple, Inc. All rights reserved.\""; + INFOPLIST_OUTPUT_FORMAT = XML; IPHONEOS_DEPLOYMENT_TARGET = 14.2; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; @@ -754,8 +956,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = GameKitWrapper/Info.plist; - INFOPLIST_OUTPUT_FORMAT = XML; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 14.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -790,8 +990,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = GameKitWrapper/Info.plist; - INFOPLIST_OUTPUT_FORMAT = XML; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 14.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -825,8 +1023,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = GameKitWrapper/Info.plist; - INFOPLIST_OUTPUT_FORMAT = XML; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -862,8 +1058,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = GameKitWrapper/Info.plist; - INFOPLIST_OUTPUT_FORMAT = XML; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -887,6 +1081,15 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 24B064852B7F29E1007ABBB8 /* Build configuration list for PBXNativeTarget "GameKitWrapper visionOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 24B064862B7F29E1007ABBB8 /* Debug */, + 24B064872B7F29E1007ABBB8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 7A7E439924B508D40086FB7A /* Build configuration list for PBXNativeTarget "GameKitWrapperMac" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/plug-ins/Apple.GameKit/Native/GameKitWrapper.xcodeproj/xcshareddata/xcschemes/visionOS - Debug.xcscheme b/plug-ins/Apple.GameKit/Native/GameKitWrapper.xcodeproj/xcshareddata/xcschemes/visionOS - Debug.xcscheme new file mode 100644 index 00000000..8a7c2108 --- /dev/null +++ b/plug-ins/Apple.GameKit/Native/GameKitWrapper.xcodeproj/xcshareddata/xcschemes/visionOS - Debug.xcscheme @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plug-ins/Apple.GameKit/Native/GameKitWrapper.xcodeproj/xcshareddata/xcschemes/visionOS - Release.xcscheme b/plug-ins/Apple.GameKit/Native/GameKitWrapper.xcodeproj/xcshareddata/xcschemes/visionOS - Release.xcscheme new file mode 100644 index 00000000..33cd45c7 --- /dev/null +++ b/plug-ins/Apple.GameKit/Native/GameKitWrapper.xcodeproj/xcshareddata/xcschemes/visionOS - Release.xcscheme @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plug-ins/Apple.GameKit/Native/GameKitWrapper/AccessPoint.swift b/plug-ins/Apple.GameKit/Native/GameKitWrapper/AccessPoint.swift index 05c5b3c8..ca9b12a9 100644 --- a/plug-ins/Apple.GameKit/Native/GameKitWrapper/AccessPoint.swift +++ b/plug-ins/Apple.GameKit/Native/GameKitWrapper/AccessPoint.swift @@ -165,17 +165,22 @@ public func GKAccessPoint_GetFrameInUnitCoordinates ) -> GKWAccessPointFrameInScreenCoordinates { let target = Unmanaged.fromOpaque(pointer).takeUnretainedValue(); + let rect = target.frameInScreenCoordinates; + // TODO: (123075676) +#if os(visionOS) + return GKWAccessPointFrameInScreenCoordinates(x: Float(rect.minX), y: Float(rect.minY), width: Float(rect.width), height: Float(rect.height)) +#else #if os(macOS) let screenSize = NSScreen.main!.frame; #else let screenSize = UIScreen.main.bounds; #endif - let rect = target.frameInScreenCoordinates; return GKWAccessPointFrameInScreenCoordinates( x: Float(rect.minX / screenSize.width), y: Float(rect.minY / screenSize.height), width: Float(rect.width / screenSize.width), height: Float(rect.height / screenSize.height)); +#endif } diff --git a/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKAchievement.swift b/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKAchievement.swift index 43157ccf..cbdceff4 100644 --- a/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKAchievement.swift +++ b/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKAchievement.swift @@ -220,5 +220,16 @@ public func GKAchievement_ChallengeComposeController { let target = Unmanaged.fromOpaque(pointer).takeUnretainedValue(); let players = Unmanaged.fromOpaque(playersPtr).takeUnretainedValue() as! [GKPlayer]; - target.challengeComposeController(withMessage: message.toString(), players: players); + +#if os(visionOS) + // Avoid including deprecated version of the API in visionOS builds. + target.challengeComposeController(withMessage: message.toString(), players: players, completion: nil) +#else + if #available(iOS 17.0, tvOS 17.0, macOS 14.0, *) { + target.challengeComposeController(withMessage: message.toString(), players: players, completion: nil) + } else { + // Explicitly set completionHandler parameter to avoid ambiguous call when building for visionOS + target.challengeComposeController(withMessage: message.toString(), players: players) + }; +#endif } diff --git a/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKGameCenterViewController.swift b/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKGameCenterViewController.swift index 96f0e93b..43979a41 100644 --- a/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKGameCenterViewController.swift +++ b/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKGameCenterViewController.swift @@ -63,10 +63,11 @@ public func GKGameCenterViewController_Present _currentPresentingGameCenterDelegate = GameKitUIDelegateHandler(taskId: taskId, onSuccess: onSuccess); target.gameCenterDelegate = _currentPresentingGameCenterDelegate; + // TODO: (123075676) #if os(iOS) || os(tvOS) let viewController = UIApplication.shared.windows.first!.rootViewController; viewController?.present(target, animated: true); -#else +#elseif os(macOS) GKDialogController.shared().parentWindow = NSApplication.shared.keyWindow; GKDialogController.shared().present(target); #endif diff --git a/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKLocalPlayer.swift b/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKLocalPlayer.swift index b68470e4..f007df02 100644 --- a/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKLocalPlayer.swift +++ b/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKLocalPlayer.swift @@ -26,7 +26,8 @@ public func GKLocalPlayer_Authenticate onError(taskId, Unmanaged.passRetained(error! as NSError).toOpaque()); return; } - + // TODO: (123075676) +#if !os(visionOS) // Always show the viewController if provided... if gcAuthVC != nil { #if os(iOS) || os(tvOS) @@ -40,6 +41,7 @@ public func GKLocalPlayer_Authenticate GKLocalPlayer.local.register(_localPlayerListener); onSuccess(taskId, GKLocalPlayer_GetLocal()); } +#endif }; } diff --git a/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKMatch.swift b/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKMatch.swift index 2e20be2b..da9ded6e 100644 --- a/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKMatch.swift +++ b/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKMatch.swift @@ -36,13 +36,12 @@ public func GKMatch_GetProperties { // GKMatchProperties is not exposed to Swift from Objective-C. // In Swift, it's merely a dictionary of strings to objects. - if #available(iOS 17.2, tvOS 17.2, macOS 14.2, *) { + if #available(iOS 17.2, tvOS 17.2, macOS 14.2, visionOS 1.1, *) { let gkMatch = Unmanaged.fromOpaque(gkMatchPtr).takeUnretainedValue() if let gkMatchProperties = gkMatch.properties as NSDictionary? { return Unmanaged.passRetained(gkMatchProperties).toOpaque(); } } - return nil; } @@ -52,13 +51,12 @@ public func GKMatch_GetPlayerProperties gkMatchPtr: UnsafeMutableRawPointer ) -> UnsafeMutableRawPointer? { - if #available(iOS 17.2, tvOS 17.2, macOS 14.2, *) { + if #available(iOS 17.2, tvOS 17.2, macOS 14.2, visionOS 1.0, *) { let gkMatch = Unmanaged.fromOpaque(gkMatchPtr).takeUnretainedValue() if let dictionary = gkMatch.playerProperties as NSDictionary? { return Unmanaged.passRetained(dictionary).toOpaque(); } } - return nil; } diff --git a/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKMatchRequest.swift b/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKMatchRequest.swift index bbf346cc..9e09afff 100644 --- a/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKMatchRequest.swift +++ b/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKMatchRequest.swift @@ -152,11 +152,10 @@ public func GKMatchRequest_GetQueueName gkMatchRequestPtr: UnsafeMutableRawPointer ) -> char_p? { - if #available(iOS 17.2, tvOS 17.2, macOS 14.2, *) { + if #available(iOS 17.2, tvOS 17.2, macOS 14.2, visionOS 1.1, *) { let gkMatchRequest = Unmanaged.fromOpaque(gkMatchRequestPtr).takeUnretainedValue(); return gkMatchRequest.queueName?.toCharPCopy(); } - return nil; } @@ -167,7 +166,7 @@ public func GKMatchRequest_SetQueueName value: char_p? ) { - if #available(iOS 17.2, tvOS 17.2, macOS 14.2, *) { + if #available(iOS 17.2, tvOS 17.2, macOS 14.2, visionOS 1.1, *) { let gkMatchRequest = Unmanaged.fromOpaque(gkMatchRequestPtr).takeUnretainedValue(); gkMatchRequest.queueName = value?.toString(); } @@ -179,7 +178,7 @@ public func GKMatchRequest_GetProperties gkMatchRequestPtr: UnsafeMutableRawPointer ) -> UnsafeMutableRawPointer? { - if #available(iOS 17.2, tvOS 17.2, macOS 14.2, *) { + if #available(iOS 17.2, tvOS 17.2, macOS 14.2, visionOS 1.1, *) { let gkMatchRequest = Unmanaged.fromOpaque(gkMatchRequestPtr).takeUnretainedValue(); if let nsDictionary = gkMatchRequest.properties as NSDictionary? { return Unmanaged.passRetained(nsDictionary).toOpaque(); @@ -196,6 +195,8 @@ public func GKMatchRequest_SetProperties nsDictionaryPtr: UnsafeMutableRawPointer? ) { + // TODO: (123075676) +#if !os(visionOS) if #available(iOS 17.2, tvOS 17.2, macOS 14.2, *) { let gkMatchRequest = Unmanaged.fromOpaque(gkMatchRequestPtr).takeUnretainedValue(); if let nonNullDictionaryPtr = nsDictionaryPtr { @@ -205,6 +206,7 @@ public func GKMatchRequest_SetProperties gkMatchRequest.properties = nil; } } +#endif } @_cdecl("GKMatchRequest_GetRecipientProperties") @@ -213,7 +215,7 @@ public func GKMatchRequest_GetRecipientProperties gkMatchRequestPtr: UnsafeMutableRawPointer ) -> UnsafeMutableRawPointer? { - if #available(iOS 17.2, tvOS 17.2, macOS 14.2, *) { + if #available(iOS 17.2, tvOS 17.2, macOS 14.2, visionOS 1.1, *) { let gkMatchRequest = Unmanaged.fromOpaque(gkMatchRequestPtr).takeUnretainedValue(); if let nsDictionary = gkMatchRequest.recipientProperties as NSDictionary? { return Unmanaged.passRetained(nsDictionary).toOpaque(); @@ -230,7 +232,7 @@ public func GKMatchRequest_SetRecipientProperties nsDictionaryPtr: UnsafeMutableRawPointer? ) { - if #available(iOS 17.2, tvOS 17.2, macOS 14.2, *) { + if #available(iOS 17.2, tvOS 17.2, macOS 14.2, visionOS 1.1, *) { let gkMatchRequest = Unmanaged.fromOpaque(gkMatchRequestPtr).takeUnretainedValue(); if let nonNullDictionaryPtr = nsDictionaryPtr { let nsDictionary = Unmanaged.fromOpaque(nonNullDictionaryPtr).takeUnretainedValue(); diff --git a/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKMatchedPlayers.m b/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKMatchedPlayers.m index ab47d173..8074d9bb 100644 --- a/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKMatchedPlayers.m +++ b/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKMatchedPlayers.m @@ -9,34 +9,25 @@ #import void * GKMatchedPlayers_Properties(void * gkMatchedPlayersPtr) { -#if !TARGET_OS_WATCH - if (@available(ios 17.2, macos 14.2, tvos 17.2, *)) { + if (@available(ios 17.2, macos 14.2, tvos 17.2, visionOS 1.1, *)) { return (void *)CFBridgingRetain([(__bridge GKMatchedPlayers *)gkMatchedPlayersPtr properties]); - } else -#endif - { + } else { return NULL; } } void * GKMatchedPlayers_Players(void * gkMatchedPlayersPtr) { -#if !TARGET_OS_WATCH - if (@available(ios 17.2, macos 14.2, tvos 17.2, *)) { + if (@available(ios 17.2, macos 14.2, tvos 17.2, visionOS 1.1, *)) { return (void *)CFBridgingRetain([(__bridge GKMatchedPlayers *)gkMatchedPlayersPtr players]); - } else -#endif - { + } else { return NULL; } } void * GKMatchedPlayers_PlayerProperties(void * gkMatchedPlayersPtr) { -#if !TARGET_OS_WATCH - if (@available(ios 17.2, macos 14.2, tvos 17.2, *)) { + if (@available(ios 17.2, macos 14.2, tvos 17.2, visionOS 1.1, *)) { return (void *)CFBridgingRetain([(__bridge GKMatchedPlayers *)gkMatchedPlayersPtr playerProperties]); - } else -#endif - { + } else { return NULL; } } diff --git a/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKMatchmaker.swift b/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKMatchmaker.swift index 7b027526..16f707cc 100644 --- a/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKMatchmaker.swift +++ b/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKMatchmaker.swift @@ -128,7 +128,7 @@ public func GKMatchMaker_FindMatchedPlayers onError: @escaping NSErrorCallback ) { - if #available(iOS 17.2, tvOS 17.2, macOS 14.2, *) { + if #available(iOS 17.2, tvOS 17.2, macOS 14.2, visionOS 1.1, *) { let gkMatchMaker = Unmanaged.fromOpaque(gkMatchmakerPtr).takeUnretainedValue() let gkMatchRequest = Unmanaged.fromOpaque(gkMatchRequestPtr).takeUnretainedValue() @@ -205,7 +205,7 @@ public func GKMatchmaker_QueryQueueActivity onError: @escaping NSErrorCallback ) { - if #available(iOS 17.2, tvOS 17.2, macOS 14.2, *) { + if #available(iOS 17.2, tvOS 17.2, macOS 14.2, visionOS 1.1, *) { let gkMatchmaker = Unmanaged.fromOpaque(gkMatchmakerPtr).takeUnretainedValue(); gkMatchmaker.queryQueueActivity(queueName.toString(), withCompletionHandler: { numPlayers, error in if (error != nil) { diff --git a/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKMatchmakerViewController.swift b/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKMatchmakerViewController.swift index ffb459a6..9f0dbd33 100644 --- a/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKMatchmakerViewController.swift +++ b/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKMatchmakerViewController.swift @@ -132,10 +132,11 @@ public func GKMatchmakerViewController_Present { let target = Unmanaged.fromOpaque(pointer).takeUnretainedValue(); + // TODO: (123075676) #if os(iOS) || os(tvOS) let viewController = UIApplication.shared.windows.first!.rootViewController; viewController?.present(target, animated: true); -#else +#elseif os(macOS) GKDialogController.shared().parentWindow = NSApplication.shared.keyWindow; GKDialogController.shared().present(target); #endif @@ -146,9 +147,10 @@ public func GKMatchmakerViewController_Dismiss viewController: GKMatchmakerViewController ) { + // TODO: (123075676) #if os(iOS) || os(tvOS) viewController.dismiss(animated: true); - #else + #elseif os(macOS) GKDialogController.shared().dismiss(viewController); #endif diff --git a/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKTurnBasedMatchmakerViewController.swift b/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKTurnBasedMatchmakerViewController.swift index 783b5d04..386d7bcd 100644 --- a/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKTurnBasedMatchmakerViewController.swift +++ b/plug-ins/Apple.GameKit/Native/GameKitWrapper/GKTurnBasedMatchmakerViewController.swift @@ -100,23 +100,26 @@ public func GKTurnBasedMatchmakerViewController_Present let target = Unmanaged.fromOpaque(pointer).takeUnretainedValue(); _presentingTurnBasedMatchmakerViewController = target; + // TODO: (123075676) #if os(iOS) || os(tvOS) let viewController = UIApplication.shared.windows.first!.rootViewController; viewController?.present(target, animated: true); -#else +#elseif os(macOS) GKDialogController.shared().parentWindow = NSApplication.shared.keyWindow; GKDialogController.shared().present(target); #endif } +@_cdecl("GKTurnBasedMatchmakerViewController_Dismiss") public func GKTurnBasedMatchmakerViewController_Dismiss ( viewController: GKTurnBasedMatchmakerViewController ) { + // TODO: (123075676) #if os(iOS) || os(tvOS) viewController.dismiss(animated: true); - #else + #elseif os(macOS) GKDialogController.shared().dismiss(viewController); #endif diff --git a/plug-ins/Apple.GameKit/Native/GameKitWrapper/GameKitUIDelegateHandler.swift b/plug-ins/Apple.GameKit/Native/GameKitWrapper/GameKitUIDelegateHandler.swift index 67063322..59e7ae6c 100644 --- a/plug-ins/Apple.GameKit/Native/GameKitWrapper/GameKitUIDelegateHandler.swift +++ b/plug-ins/Apple.GameKit/Native/GameKitWrapper/GameKitUIDelegateHandler.swift @@ -20,11 +20,12 @@ public class GameKitUIDelegateHandler : NSObject { extension GameKitUIDelegateHandler : GKGameCenterControllerDelegate { public func gameCenterViewControllerDidFinish(_ gameCenterViewController: GKGameCenterViewController) { + // TODO: (123075676) #if os(iOS) || os(tvOS) gameCenterViewController.dismiss(animated: true, completion: { self._onSuccess?(self._taskId!); }); - #else + #elseif os(macOS) GKDialogController.shared().dismiss(gameCenterViewController); self._onSuccess?(self._taskId!); #endif diff --git a/plug-ins/Apple.GameKit/Native/GameKitWrapper/GameKitWrapper.h b/plug-ins/Apple.GameKit/Native/GameKitWrapper/GameKitWrapper.h index 147402b2..aa21661d 100644 --- a/plug-ins/Apple.GameKit/Native/GameKitWrapper/GameKitWrapper.h +++ b/plug-ins/Apple.GameKit/Native/GameKitWrapper/GameKitWrapper.h @@ -14,10 +14,9 @@ FOUNDATION_EXPORT double GameKitWrapperVersionNumber; FOUNDATION_EXPORT const unsigned char GameKitWrapperVersionString[]; //! iOS & tvOS Frameworks do not support bridging headers... -#if TARGET_OS_IOS || TARGET_OS_TV +#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION #include - #import "AppleCoreRuntimeShared.h" #import "AccessPoint_BridgingHeader.h" #import "GKErrorCodeExtension.h" diff --git a/plug-ins/Apple.PHASE/Apple.PHASE_Unity/Assets/CHANGELOG.md b/plug-ins/Apple.PHASE/Apple.PHASE_Unity/Assets/CHANGELOG.md index b319244d..32052844 100644 --- a/plug-ins/Apple.PHASE/Apple.PHASE_Unity/Assets/CHANGELOG.md +++ b/plug-ins/Apple.PHASE/Apple.PHASE_Unity/Assets/CHANGELOG.md @@ -1,6 +1,10 @@ # CHANGELOG All notable changes to this project will be documented in this file. +## [1.2.0] - 2024-02-23 +### Added +- Support for visionOS + ## [1.1.0] - 2024-02-11 ### Updated - Adopt Apple.Core 3.0.0 diff --git a/plug-ins/Apple.PHASE/Apple.PHASE_Unity/Assets/Editor/PHASEBuildStep.cs b/plug-ins/Apple.PHASE/Apple.PHASE_Unity/Assets/Editor/PHASEBuildStep.cs index db589668..ebd99ceb 100644 --- a/plug-ins/Apple.PHASE/Apple.PHASE_Unity/Assets/Editor/PHASEBuildStep.cs +++ b/plug-ins/Apple.PHASE/Apple.PHASE_Unity/Assets/Editor/PHASEBuildStep.cs @@ -5,7 +5,7 @@ using UnityEditor; using UnityEngine; -#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) using UnityEditor.iOS.Xcode; #endif @@ -14,14 +14,14 @@ namespace Apple.PHASE.Editor public class PHASEBuildStep : AppleBuildStep { public override string DisplayName => "Apple.PHASE"; - public override BuildTarget[] SupportedTargets => new BuildTarget[] {BuildTarget.iOS, BuildTarget.tvOS, BuildTarget.StandaloneOSX}; + public override BuildTarget[] SupportedTargets => new BuildTarget[] {BuildTarget.iOS, BuildTarget.tvOS, BuildTarget.StandaloneOSX, BuildTarget.VisionOS}; -#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#if (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) public override void OnBeginPostProcess(AppleBuildProfile appleBuildProfile, BuildTarget buildTarget, string pathToBuiltProject) { if (buildTarget == BuildTarget.iOS || buildTarget == BuildTarget.tvOS) { - var projectPath = PBXProject.GetPBXProjectPath(pathToBuiltProject); + var projectPath = AppleBuild.GetPbxProjectPath(buildTarget, pathToBuiltProject); PBXProject project = new PBXProject(); if (File.Exists(projectPath)) { @@ -56,7 +56,7 @@ public override void OnProcessFrameworks(AppleBuildProfile _, BuildTarget buildT { AppleNativeLibraryUtility.ProcessWrapperLibrary(DisplayName, buildTarget, generatedProjectPath, pbxProject); - if (buildTarget == BuildTarget.iOS || buildTarget == BuildTarget.tvOS) + if (buildTarget == BuildTarget.iOS || buildTarget == BuildTarget.tvOS || buildTarget == BuildTarget.VisionOS) { pbxProject.AddFrameworkToProject(pbxProject.GetUnityFrameworkTargetGuid(), "PHASE.framework", false); pbxProject.AddFrameworkToProject(pbxProject.GetUnityFrameworkTargetGuid(), "ModelIO.framework", false); @@ -73,6 +73,6 @@ public override void OnProcessFrameworks(AppleBuildProfile _, BuildTarget buildT Debug.LogWarning($"[{DisplayName}] No native library defined for Unity build target {buildTarget.ToString()}. Skipping."); } } -#endif // (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX)) +#endif // (UNITY_EDITOR_OSX && (UNITY_IOS || UNITY_TVOS || UNITY_STANDALONE_OSX || UNITY_VISIONOS)) } } diff --git a/plug-ins/Apple.PHASE/Apple.PHASE_Unity/Assets/Runtime/Apple.PHASE.asmdef b/plug-ins/Apple.PHASE/Apple.PHASE_Unity/Assets/Runtime/Apple.PHASE.asmdef index 803b210d..aefcbc10 100644 --- a/plug-ins/Apple.PHASE/Apple.PHASE_Unity/Assets/Runtime/Apple.PHASE.asmdef +++ b/plug-ins/Apple.PHASE/Apple.PHASE_Unity/Assets/Runtime/Apple.PHASE.asmdef @@ -8,7 +8,8 @@ "Editor", "iOS", "macOSStandalone", - "tvOS" + "tvOS", + "VisionOS" ], "excludePlatforms": [], "allowUnsafeCode": false, diff --git a/plug-ins/Apple.PHASE/Apple.PHASE_Unity/Assets/Runtime/PHASEHelpers.cs b/plug-ins/Apple.PHASE/Apple.PHASE_Unity/Assets/Runtime/PHASEHelpers.cs index 81e2de9e..c94da7e1 100644 --- a/plug-ins/Apple.PHASE/Apple.PHASE_Unity/Assets/Runtime/PHASEHelpers.cs +++ b/plug-ins/Apple.PHASE/Apple.PHASE_Unity/Assets/Runtime/PHASEHelpers.cs @@ -12,10 +12,10 @@ static public class Helpers /// /// The name of the plugin DLL based on which platform is being used. /// -#if UNITY_EDITOR || UNITY_STANDALONE_OSX - public const string PluginDllName = "AudioPluginPHASE"; -#elif UNITY_IOS || UNITY_TVOS +#if (UNITY_IOS || UNITY_TVOS || UNITY_VISIONOS) && !UNITY_EDITOR public const string PluginDllName = "__Internal"; +#else + public const string PluginDllName = "AudioPluginPHASE"; #endif /// diff --git a/plug-ins/Apple.PHASE/Apple.PHASE_Unity/Assets/package.json b/plug-ins/Apple.PHASE/Apple.PHASE_Unity/Assets/package.json index 3c792bc3..6375d27d 100644 --- a/plug-ins/Apple.PHASE/Apple.PHASE_Unity/Assets/package.json +++ b/plug-ins/Apple.PHASE/Apple.PHASE_Unity/Assets/package.json @@ -2,10 +2,10 @@ "name": "com.apple.unityplugin.phase", "displayName": "Apple.PHASE", "description": "A Unity plugin for Apple's PHASE.framework.", - "version": "1.1.0", + "version": "1.2.0", "unity": "2022.3", "dependencies": { - "com.apple.unityplugin.core": "3.0.0" + "com.apple.unityplugin.core": "3.1.0" }, "keywords": [ "audio", diff --git a/plug-ins/Apple.PHASE/Apple.PHASE_Unity/ProjectSettings/ProjectSettings.asset b/plug-ins/Apple.PHASE/Apple.PHASE_Unity/ProjectSettings/ProjectSettings.asset index d0ec5ef2..3a1299f5 100644 --- a/plug-ins/Apple.PHASE/Apple.PHASE_Unity/ProjectSettings/ProjectSettings.asset +++ b/plug-ins/Apple.PHASE/Apple.PHASE_Unity/ProjectSettings/ProjectSettings.asset @@ -190,7 +190,7 @@ PlayerSettings: tvOSSdkVersion: 0 tvOSRequireExtendedGameController: 0 tvOSTargetOSVersionString: 12.0 - VisionOSSdkVersion: 0 + VisionOSSdkVersion: 1 VisionOSTargetOSVersionString: 1.0 uIPrerenderedIcon: 0 uIRequiresPersistentWiFi: 0 diff --git a/plug-ins/Apple.PHASE/Native/AudioPluginPHASE.xcodeproj/project.pbxproj b/plug-ins/Apple.PHASE/Native/AudioPluginPHASE.xcodeproj/project.pbxproj index 4c629675..4f1760f1 100755 --- a/plug-ins/Apple.PHASE/Native/AudioPluginPHASE.xcodeproj/project.pbxproj +++ b/plug-ins/Apple.PHASE/Native/AudioPluginPHASE.xcodeproj/project.pbxproj @@ -11,7 +11,7 @@ isa = PBXAggregateTarget; buildConfigurationList = 241B6AB02947E2F000EC7B7A /* Build configuration list for PBXAggregateTarget "tvOS_sentinel" */; buildPhases = ( - 241B6AB12947E30A00EC7B7A /* tvOS Unsupported Message */, + 241B6AB12947E30A00EC7B7A /* ShellScript */, ); dependencies = ( ); @@ -21,6 +21,14 @@ /* End PBXAggregateTarget section */ /* Begin PBXBuildFile section */ + 24577AFE294BCE0800A9D6D8 /* AudioPluginPHASE.a in Copy plugin to Unity project */ = {isa = PBXBuildFile; fileRef = FF98C0671F23DCD70043047A /* AudioPluginPHASE.a */; platformFilter = ios; }; + 2497EC972B7FFA5D00E5B2EE /* PHASEInterface.mm in Sources */ = {isa = PBXBuildFile; fileRef = 30B5DE4323608C850035B5D1 /* PHASEInterface.mm */; }; + 2497EC982B7FFA5D00E5B2EE /* PHASESoundEventInterface.mm in Sources */ = {isa = PBXBuildFile; fileRef = 309301C223A11DA7007FF16D /* PHASESoundEventInterface.mm */; }; + 2497EC992B7FFA5D00E5B2EE /* PHASEWrapper.mm in Sources */ = {isa = PBXBuildFile; fileRef = 30B5DE3F23608C730035B5D1 /* PHASEWrapper.mm */; }; + 2497EC9B2B7FFA5D00E5B2EE /* PHASE.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 64FADC8E267A8EDF004FC962 /* PHASE.framework */; }; + 2497EC9C2B7FFA5D00E5B2EE /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 30E4658C237749A30050BC49 /* AVFoundation.framework */; }; + 2497EC9D2B7FFA5D00E5B2EE /* ModelIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 30CC5B842374488D002C7623 /* ModelIO.framework */; }; + 2497EC9F2B7FFA5D00E5B2EE /* AudioPluginPHASE.a in Copy plugin to Unity project */ = {isa = PBXBuildFile; fileRef = FF98C0671F23DCD70043047A /* AudioPluginPHASE.a */; platformFilter = ios; }; 302D376323621CA40030DA9A /* AudioPluginPHASE.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FF98C0671F23DCD70043047A /* AudioPluginPHASE.a */; platformFilter = ios; }; 302D377623621F2E0030DA9A /* AudioPluginPHASE_Tests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 302D377523621F2E0030DA9A /* AudioPluginPHASE_Tests.mm */; platformFilter = ios; }; 302D377723621F2E0030DA9A /* AudioPluginPHASE_Tests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 302D377523621F2E0030DA9A /* AudioPluginPHASE_Tests.mm */; }; @@ -65,8 +73,44 @@ }; /* End PBXContainerItemProxy section */ +/* Begin PBXCopyFilesBuildPhase section */ + 2497EC9E2B7FFA5D00E5B2EE /* Copy plugin to Unity project */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "$(PLUGIN_DST_FOLDER)"; + dstSubfolderSpec = 0; + files = ( + 2497EC9F2B7FFA5D00E5B2EE /* AudioPluginPHASE.a in Copy plugin to Unity project */, + ); + name = "Copy plugin to Unity project"; + runOnlyForDeploymentPostprocessing = 0; + }; + 300C0E7C234FD346006C3C18 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; + 646655DA2609523800EBAB9D /* Copy plugin to Unity project */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "$(PLUGIN_DST_FOLDER)"; + dstSubfolderSpec = 0; + files = ( + 24577AFE294BCE0800A9D6D8 /* AudioPluginPHASE.a in Copy plugin to Unity project */, + ); + name = "Copy plugin to Unity project"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ 240646162B62D80600246067 /* PHASE.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = PHASE.xcconfig; sourceTree = ""; }; + 2497ECA42B7FFA5D00E5B2EE /* AudioPluginPHASE.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = AudioPluginPHASE.a; sourceTree = BUILT_PRODUCTS_DIR; }; 302D375E23621CA30030DA9A /* AudioPluginPHASE-Tests-iOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "AudioPluginPHASE-Tests-iOS.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 302D376223621CA40030DA9A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 302D376D23621EC90030DA9A /* AudioPluginPHASE-Tests-macOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "AudioPluginPHASE-Tests-macOS.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -97,6 +141,16 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 2497EC9A2B7FFA5D00E5B2EE /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 2497EC9B2B7FFA5D00E5B2EE /* PHASE.framework in Frameworks */, + 2497EC9C2B7FFA5D00E5B2EE /* AVFoundation.framework in Frameworks */, + 2497EC9D2B7FFA5D00E5B2EE /* ModelIO.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 302D375B23621CA30030DA9A /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -228,6 +282,7 @@ FFE523541F249EB000650301 /* AudioPluginPHASE.bundle */, 302D375E23621CA30030DA9A /* AudioPluginPHASE-Tests-iOS.xctest */, 302D376D23621EC90030DA9A /* AudioPluginPHASE-Tests-macOS.xctest */, + 2497ECA42B7FFA5D00E5B2EE /* AudioPluginPHASE.a */, ); name = Products; sourceTree = ""; @@ -235,6 +290,23 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ + 2497EC952B7FFA5D00E5B2EE /* AudioPluginPHASE-visionOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2497ECA12B7FFA5D00E5B2EE /* Build configuration list for PBXNativeTarget "AudioPluginPHASE-visionOS" */; + buildPhases = ( + 2497EC962B7FFA5D00E5B2EE /* Sources */, + 2497EC9A2B7FFA5D00E5B2EE /* Frameworks */, + 2497EC9E2B7FFA5D00E5B2EE /* Copy plugin to Unity project */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "AudioPluginPHASE-visionOS"; + productName = "AudioPluginPHASE iOS"; + productReference = 2497ECA42B7FFA5D00E5B2EE /* AudioPluginPHASE.a */; + productType = "com.apple.product-type.library.static"; + }; 302D375D23621CA30030DA9A /* AudioPluginPHASE-Tests-iOS */ = { isa = PBXNativeTarget; buildConfigurationList = 302D376623621CA40030DA9A /* Build configuration list for PBXNativeTarget "AudioPluginPHASE-Tests-iOS" */; @@ -277,6 +349,7 @@ 8D576311048677EA00EA77CD /* Sources */, 8D576313048677EA00EA77CD /* Frameworks */, 4A04C16D23914C9D003F9E22 /* Relocate PHASE framework */, + 300C0E7C234FD346006C3C18 /* Embed Frameworks */, ); buildRules = ( ); @@ -294,6 +367,7 @@ buildPhases = ( FF98C01A1F220FED0043047A /* Sources */, FF98C0021F220DA10043047A /* Frameworks */, + 646655DA2609523800EBAB9D /* Copy plugin to Unity project */, ); buildRules = ( ); @@ -342,6 +416,7 @@ targets = ( 8D57630D048677EA00EA77CD /* AudioPluginPHASE */, FF98C0041F220DA10043047A /* AudioPluginPHASE-iOS */, + 2497EC952B7FFA5D00E5B2EE /* AudioPluginPHASE-visionOS */, 302D375D23621CA30030DA9A /* AudioPluginPHASE-Tests-iOS */, 302D376C23621EC90030DA9A /* AudioPluginPHASE-Tests-macOS */, 241B6AAD2947E2F000EC7B7A /* tvOS_sentinel */, @@ -369,7 +444,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 241B6AB12947E30A00EC7B7A /* tvOS Unsupported Message */ = { + 241B6AB12947E30A00EC7B7A /* ShellScript */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; buildActionMask = 2147483647; @@ -379,7 +454,6 @@ ); inputPaths = ( ); - name = "tvOS Unsupported Message"; outputFileListPaths = ( ); outputPaths = ( @@ -410,6 +484,16 @@ /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + 2497EC962B7FFA5D00E5B2EE /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2497EC972B7FFA5D00E5B2EE /* PHASEInterface.mm in Sources */, + 2497EC982B7FFA5D00E5B2EE /* PHASESoundEventInterface.mm in Sources */, + 2497EC992B7FFA5D00E5B2EE /* PHASEWrapper.mm in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 302D375A23621CA30030DA9A /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -493,8 +577,6 @@ "ENABLE_INTERNAL_FEATURES=1", ); GCC_TREAT_WARNINGS_AS_ERRORS = YES; - INFOPLIST_FILE = Info.plist; - INFOPLIST_OUTPUT_FORMAT = XML; INSTALL_PATH = /Plugins/MacOS; LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ""; @@ -532,8 +614,6 @@ GCC_C_LANGUAGE_STANDARD = gnu99; GCC_MODEL_TUNING = G5; GCC_TREAT_WARNINGS_AS_ERRORS = YES; - INFOPLIST_FILE = Info.plist; - INFOPLIST_OUTPUT_FORMAT = XML; INSTALL_PATH = /Plugins/MacOS; LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ""; @@ -587,6 +667,9 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = Info.plist; + INFOPLIST_KEY_NSHumanReadableCopyright = "\"Copyright © 2021 - 2024 Apple, Inc. All rights reserved.\""; + INFOPLIST_OUTPUT_FORMAT = XML; LIBRARY_SEARCH_PATHS = ""; MACOSX_DEPLOYMENT_TARGET = 10.11; ONLY_ACTIVE_ARCH = YES; @@ -630,6 +713,9 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = Info.plist; + INFOPLIST_KEY_NSHumanReadableCopyright = "\"Copyright © 2021 - 2024 Apple, Inc. All rights reserved.\""; + INFOPLIST_OUTPUT_FORMAT = XML; LIBRARY_SEARCH_PATHS = ""; MACOSX_DEPLOYMENT_TARGET = 10.11; PRODUCT_BUNDLE_IDENTIFIER = AudioPluginPHASE; @@ -660,6 +746,73 @@ }; name = Release; }; + 2497ECA22B7FFA5D00E5B2EE /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 240646162B62D80600246067 /* PHASE.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD)"; + CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_OBJC_WEAK = YES; + DEAD_CODE_STRIPPING = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + EXECUTABLE_PREFIX = ""; + GCC_PREPROCESSOR_DEFINITIONS = ( + ENABLE_ENVIRONMENTAL_PROCESS, + ENABLE_OBSTRUCTION, + ENABLE_ROOM_MODEL_SELECTION, + DEV_BUILD, + "ENABLE_INTERNAL_FEATURES=1", + ); + INSTALL_PATH = /Plugins/iOS; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + MACOSX_DEPLOYMENT_TARGET = 12.0; + OTHER_CFLAGS = "-mno-thumb"; + OTHER_LDFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = "com.apple-plugins.AudioPluginPHASE-visionOS"; + PRODUCT_MODULE_NAME = AudioPluginPHASE; + PRODUCT_NAME = AudioPluginPHASE; + SDKROOT = xros; + SKIP_INSTALL = NO; + SYSTEM_FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", + ); + USER_HEADER_SEARCH_PATHS = ""; + }; + name = Debug; + }; + 2497ECA32B7FFA5D00E5B2EE /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 240646162B62D80600246067 /* PHASE.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD)"; + CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_OBJC_WEAK = YES; + DEAD_CODE_STRIPPING = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + EXECUTABLE_PREFIX = ""; + INSTALL_PATH = /Plugins/iOS; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + MACOSX_DEPLOYMENT_TARGET = 12.0; + OTHER_CFLAGS = "-mno-thumb"; + OTHER_LDFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = "com.apple-plugins.AudioPluginPHASE-visionOS"; + PRODUCT_MODULE_NAME = AudioPluginPHASE; + PRODUCT_NAME = AudioPluginPHASE; + SDKROOT = xros; + SKIP_INSTALL = NO; + SYSTEM_FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", + ); + USER_HEADER_SEARCH_PATHS = ""; + }; + name = Release; + }; 302D376723621CA40030DA9A /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 240646162B62D80600246067 /* PHASE.xcconfig */; @@ -908,7 +1061,6 @@ DEV_BUILD, "ENABLE_INTERNAL_FEATURES=1", ); - INFOPLIST_OUTPUT_FORMAT = XML; INSTALL_PATH = /Plugins/iOS; IPHONEOS_DEPLOYMENT_TARGET = 15.0; MACOSX_DEPLOYMENT_TARGET = 12.0; @@ -939,7 +1091,6 @@ DEAD_CODE_STRIPPING = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; EXECUTABLE_PREFIX = ""; - INFOPLIST_OUTPUT_FORMAT = XML; INSTALL_PATH = /Plugins/iOS; IPHONEOS_DEPLOYMENT_TARGET = 15.0; MACOSX_DEPLOYMENT_TARGET = 12.0; @@ -988,6 +1139,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 2497ECA12B7FFA5D00E5B2EE /* Build configuration list for PBXNativeTarget "AudioPluginPHASE-visionOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2497ECA22B7FFA5D00E5B2EE /* Debug */, + 2497ECA32B7FFA5D00E5B2EE /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 302D376623621CA40030DA9A /* Build configuration list for PBXNativeTarget "AudioPluginPHASE-Tests-iOS" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/plug-ins/Apple.PHASE/Native/AudioPluginPHASE.xcodeproj/xcshareddata/xcschemes/visionOS - Debug.xcscheme b/plug-ins/Apple.PHASE/Native/AudioPluginPHASE.xcodeproj/xcshareddata/xcschemes/visionOS - Debug.xcscheme new file mode 100644 index 00000000..ecb2c862 --- /dev/null +++ b/plug-ins/Apple.PHASE/Native/AudioPluginPHASE.xcodeproj/xcshareddata/xcschemes/visionOS - Debug.xcscheme @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plug-ins/Apple.PHASE/Native/AudioPluginPHASE.xcodeproj/xcshareddata/xcschemes/visionOS - Release.xcscheme b/plug-ins/Apple.PHASE/Native/AudioPluginPHASE.xcodeproj/xcshareddata/xcschemes/visionOS - Release.xcscheme new file mode 100644 index 00000000..8127b7ec --- /dev/null +++ b/plug-ins/Apple.PHASE/Native/AudioPluginPHASE.xcodeproj/xcshareddata/xcschemes/visionOS - Release.xcscheme @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/scripts/python/upi_build_context.py b/scripts/python/upi_build_context.py index a0958bee..15e85065 100644 --- a/scripts/python/upi_build_context.py +++ b/scripts/python/upi_build_context.py @@ -17,12 +17,14 @@ def __init__(self, platform_root : str, build_destination : str) -> None: PlatformID.TVOS : BuildInfo("tvOS", "generic/platform=tvOS"), PlatformID.TVOS_SIMULATOR : BuildInfo("tvOS", "generic/platform=tvOS Simulator"), PlatformID.MACOS : BuildInfo("macOS", "generic/platform=macOS"), + PlatformID.VISIONOS : BuildInfo("visionOS", "generic/platform=visionOS"), + PlatformID.VISIONOS_SIMULATOR : BuildInfo("visionOS", "generic/platform=visionOS Simulator") } # Common context data for building the plug-ins. class BuildContext: - SIMULATOR_PLATFORMS = [PlatformID.IOS_SIMULATOR, PlatformID.TVOS_SIMULATOR] - DEVICE_PLATFORMS = [PlatformID.IOS, PlatformID.TVOS, PlatformID.MACOS] + SIMULATOR_PLATFORMS = [PlatformID.IOS_SIMULATOR, PlatformID.TVOS_SIMULATOR, PlatformID.VISIONOS_SIMULATOR] + DEVICE_PLATFORMS = [PlatformID.IOS, PlatformID.TVOS, PlatformID.MACOS, PlatformID.VISIONOS] def __init__(self, root_path : Path) -> None: # Required Paths diff --git a/scripts/python/upi_cli_argument_options.py b/scripts/python/upi_cli_argument_options.py index d489b2c0..df034154 100644 --- a/scripts/python/upi_cli_argument_options.py +++ b/scripts/python/upi_cli_argument_options.py @@ -18,8 +18,10 @@ class PlatformID: IOS = "iOS" TVOS = "tvOS" MACOS = "macOS" + VISIONOS = "visionOS" IOS_SIMULATOR = "iPhoneSimulator" TVOS_SIMULATOR = "AppleTVSimulator" + VISIONOS_SIMULATOR = "VisionSimulator" # Just simulator platforms: iOS-simulator, tvOS-simulator SIMULATORS = "simulators" diff --git a/scripts/python/upi_toolchain.py b/scripts/python/upi_toolchain.py index 26a6d2a8..4987d442 100644 --- a/scripts/python/upi_toolchain.py +++ b/scripts/python/upi_toolchain.py @@ -35,14 +35,25 @@ def GetSupportedPlatformList() -> list[str]: for line in output_lines: if "iPhoneOS.platform" in line: result.add(PlatformID.IOS) + elif "AppleTVOS.platform" in line: result.add(PlatformID.TVOS) + elif "MacOSX.platform" in line: result.add(PlatformID.MACOS) + + elif "XROS.platform" in line: + result.add(PlatformID.VISIONOS) + elif "iPhoneSimulator.platform" in line: result.add(PlatformID.IOS_SIMULATOR) + elif "AppleTVSimulator.platform" in line: result.add(PlatformID.TVOS_SIMULATOR) + + elif "XRSimulator.platform" in line: + result.add(PlatformID.VISIONOS_SIMULATOR) + else: continue diff --git a/scripts/python/upi_unity_native_plugin_manager.py b/scripts/python/upi_unity_native_plugin_manager.py index a117062a..069c6705 100644 --- a/scripts/python/upi_unity_native_plugin_manager.py +++ b/scripts/python/upi_unity_native_plugin_manager.py @@ -226,7 +226,9 @@ def ProcessNativeUnityPlugin(self, plugin_path : Path) -> None: "iPhoneSimulator":("iOS", UnitySdkVariantID.SIMULATOR), "tvOS":("tvOS", UnitySdkVariantID.DEVICE), "AppleTVSimulator":("tvOS",UnitySdkVariantID.SIMULATOR), - "macOS":("StandaloneOSX", UnitySdkVariantID.DEVICE)} + "macOS":("StandaloneOSX", UnitySdkVariantID.DEVICE), + "visionOS":("VisionOS", UnitySdkVariantID.DEVICE), + "VisionSimulator":("VisionOS", UnitySdkVariantID.SIMULATOR)} native_plugin.unity_project.supported_platforms.clear() diff --git a/scripts/shell/copy_native_libraries.sh b/scripts/shell/copy_native_libraries.sh index 76c8d8ce..80e6d43d 100755 --- a/scripts/shell/copy_native_libraries.sh +++ b/scripts/shell/copy_native_libraries.sh @@ -31,6 +31,10 @@ elif [[ $SDKROOT = *'iphonesimulator'* ]]; then PLATFORM="iPhoneSimulator" elif [[ $SDKROOT = *'appletvsimulator'* ]]; then PLATFORM="AppleTVSimulator" +elif [[ $SDKROOT = *'xros'* ]]; then + PLATFORM="visionOS" +elif [[ $SDKROOT = *'xrsimulator'* ]]; then + PLATFORM="VisionSimulator" fi if [[ $PLATFORM == "Unknown" ]]; then