diff --git a/README.md b/README.md index 61d4589..9cb0138 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ An Xcode replacement-ish *development environment* that aims to be your reliable ## 👁 Overview -[XBase] enables you to build, watch, and run xcode products as well as swift packages from within your favorite editor. It supports running products on iOS, watchOS and tvOS simulators, along with real-time logging, and some lsp features such as auto-completion and code navigation. ([🌟 Features](#-features)). +[XBase] enables you to build, watch, and run xcode products as well as swift packages from within your favorite editor. It supports running products on iOS, watchOS, tvOS, and visionOS simulators, along with real-time logging, and some lsp features such as auto-completion and code navigation. ([🌟 Features](#-features)). Furthermore, [XBase] has built-in support for a variety of Xcode project generators, which allow you to avoid launching Xcode or manually editing '*.xcodeproj' anytime you add or remove files. We strongly advise you to use one ... at least till [XBase] supports adding/removing files and folders, along with other requirements. ([💆 Generators](#-generators)) @@ -215,6 +215,7 @@ require("xbase.statusline").feline() -- append to feline setup function }, watchOS = {}, -- all available devices tvOS = {}, -- all available devices + visionOS = {} -- all available devices }, --- Log buffer configurations log_buffer = { diff --git a/lua/xbase/config.lua b/lua/xbase/config.lua index 606c53e..5ca4326 100644 --- a/lua/xbase/config.lua +++ b/lua/xbase/config.lua @@ -35,6 +35,7 @@ local defaults = { }, watchOS = {}, -- all available devices tvOS = {}, -- all available devices + xrOS = {} -- all available devices }, --- Log buffer configurations log_buffer = { diff --git a/src/runner/device.rs b/src/runner/device.rs index 5a3ab62..246658b 100644 --- a/src/runner/device.rs +++ b/src/runner/device.rs @@ -49,13 +49,14 @@ impl From for Device { impl Device { /// Get special build arguments to run on current device. - // -sdk driverkit -sdk iphoneos -sdk macosx -sdk appletvos -sdk watchos + // -sdk driverkit -sdk iphoneos -sdk macosx -sdk appletvos -sdk watchos -sdk xros pub fn special_build_args(&self) -> Vec { match self.platform { PBXTargetPlatform::IOS => vec!["-sdk".into(), "iphonesimulator".into()], PBXTargetPlatform::WatchOS => vec!["-sdk".into(), "watchsimulator".into()], PBXTargetPlatform::TvOS => vec!["-sdk".into(), "appletvsimulator".into()], PBXTargetPlatform::MacOS => vec!["-sdk".into(), "macosx".into()], + PBXTargetPlatform::XrOS => vec!["-sdk".into(), "xrsimulator".into()], PBXTargetPlatform::Unknown => vec![], } } @@ -74,6 +75,7 @@ impl Default for Runners { PBXTargetPlatform::IOS, PBXTargetPlatform::WatchOS, PBXTargetPlatform::TvOS, + PBXTargetPlatform::XrOS, ] .into_iter() .map(|p| { diff --git a/vscode/package.json b/vscode/package.json index e31941e..8736bc0 100644 --- a/vscode/package.json +++ b/vscode/package.json @@ -108,6 +108,12 @@ "default": [], "type": "list", "order": 3 + }, + "xbase.simctl.xrOS": { + "markdownDescription": "visionOS simulators to include. run `xcrun simctl list` to get a full list of available simulators. If the list is empty then all available simulators will be included", + "default": [], + "type": "list", + "order": 3 } } } diff --git a/vscode/xbase/commands.ts b/vscode/xbase/commands.ts index 61eb22e..e708826 100644 --- a/vscode/xbase/commands.ts +++ b/vscode/xbase/commands.ts @@ -77,6 +77,8 @@ function getPickerItems( case "watchOS": platformDevices = devices.watchOS; break; + case "xrOS": + platformDevices = devices.xrOS; default: platformDevices = devices.tvOS; break; diff --git a/vscode/xbase/config.ts b/vscode/xbase/config.ts index 819d107..eb5b437 100644 --- a/vscode/xbase/config.ts +++ b/vscode/xbase/config.ts @@ -15,11 +15,12 @@ export default { }; }, - get devices(): { iOS: string[], watchOS: string[], tvOS: string[] } { + get devices(): { iOS: string[], watchOS: string[], tvOS: string[], xrOS: string[] } { return getConfig("simctl", "devices", { iOS: getConfig("simctl", "iOS", []), watchOS: getConfig("simctl", "watchOS", []), - tvOS: getConfig("simctl", "tvOS", []) + tvOS: getConfig("simctl", "tvOS", []), + xrOS: getConfig("simctl", "xrOS", []) }); } };