### Install Plugin Dependencies via Makefile (Bash) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt This command navigates to the plugin's installation directory and runs the 'install' target in the Makefile. This is a quick way to install all required dependencies as defined by the plugin's build script. ```Bash cd ~/.local/share/nvim/lazy/xcodebuild.nvim make install ``` -------------------------------- ### Select Xcode Device (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Starts a picker interface allowing the user to select a target device or simulator for running or installing the app. Accepts an optional callback function `callback`. ```Lua M.select_device({callback}) ``` -------------------------------- ### Install Xcode App (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Installs the built application onto the currently selected device or simulator. Accepts an optional callback function `callback`. ```Lua M.install_app({callback}) ``` -------------------------------- ### Installing Application on Simulator (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Installs the application located at appPath on a specific simulator destination. Optionally boots the simulator if needed. An optional callback can be provided. ```Lua M.install_app_on_simulator({destination}, {appPath}, {bootIfNeeded}, {callback}) ``` -------------------------------- ### Installing Application (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Installs the application located at appPath on the specified platform and destination. An optional callback can be provided. ```Lua M.install_app({platform}, {destination}, {appPath}, {callback}) ``` -------------------------------- ### Boot Xcode Simulator (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Starts the currently selected simulator if it is not already running. Accepts an optional callback function `callback`. ```Lua M.boot_simulator({callback}) ``` -------------------------------- ### lualine Integration Example Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt This Lua code snippet provides example functions and configuration for integrating xcodebuild.nvim global variables into the lualine status line. It shows how to format device information and display the last build/test status and selected test plan. ```lua local function xcodebuild_device() if vim.g.xcodebuild_platform == "macOS" then return " macOS" end local deviceIcon = "" if vim.g.xcodebuild_platform:match("watch") then deviceIcon = "􀟤" elseif vim.g.xcodebuild_platform:match("tv") then deviceIcon = "􀡴 " elseif vim.g.xcodebuild_platform:match("vision") then deviceIcon = "􁎖 " end if vim.g.xcodebuild_os then return deviceIcon .. " " .. vim.g.xcodebuild_device_name .. " (" .. vim.g.xcodebuild_os .. ")" end return deviceIcon .. " " .. vim.g.xcodebuild_device_name end ------ lualine_x = { { "' ' .. vim.g.xcodebuild_last_status", color = { fg = "Gray" } }, { "'󰙨 ' .. vim.g.xcodebuild_test_plan", color = { fg = "#a6e3a1", bg = "#161622" } } } ``` -------------------------------- ### Show All Actions in Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Displays a picker presenting all available actions relevant to the current project type. If the project configuration is missing, it guides the user through the configuration wizard instead. ```Lua M.show_all_actions() ``` -------------------------------- ### Installing Application on Device (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Installs the application located at appPath on a specific device destination. An optional callback can be provided. ```Lua M.install_app_on_device({destination}, {appPath}, {callback}) ``` -------------------------------- ### Select Xcode Scheme (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Starts a picker interface allowing the user to select a different scheme for building, running, or testing. Accepts an optional callback function `callback`. ```Lua M.select_scheme({callback}) ``` -------------------------------- ### Run All Xcode Tests (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Starts all tests defined within the current Xcode project. ```Lua M.run_tests() ``` -------------------------------- ### Configuring xcodebuild.nvim Setup Options (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt This snippet demonstrates how to initialize and configure the xcodebuild.nvim plugin by calling the `setup` function with a table of options. It shows the default configuration for various aspects like build/test arguments, logging behavior, test search, diagnostics, quickfix lists, and the test explorer. ```lua require("xcodebuild").setup({ restore_on_start = true, -- logs, diagnostics, and marks will be loaded on VimEnter (may affect performance) auto_save = true, -- save all buffers before running build or tests (command: silent wa!) show_build_progress_bar = true, -- shows [ ... ] progress bar during build, based on the last duration prepare_snapshot_test_previews = true, -- prepares a list with failing snapshot tests test_search = { file_matching = "filename_lsp", -- one of: filename, lsp, lsp_filename, filename_lsp. Check out README for details target_matching = true, -- checks if the test file target matches the one from logs. Try disabling it in case of not showing test results lsp_client = "sourcekit", -- name of your LSP for Swift files lsp_timeout = 200, -- LSP timeout in milliseconds }, commands = { extra_build_args = { "-parallelizeTargets" }, -- extra arguments for `xcodebuild build` extra_test_args = { "-parallelizeTargets" }, -- extra arguments for `xcodebuild test` project_search_max_depth = 3, -- maxdepth of xcodeproj/xcworkspace search while using configuration wizard focus_simulator_on_app_launch = true, -- focus simulator window when app is launched keep_device_cache = false, -- keep device cache even if scheme or project file changes }, logs = { -- build & test logs auto_open_on_success_tests = false, -- open logs when tests succeeded auto_open_on_failed_tests = false, -- open logs when tests failed auto_open_on_success_build = false, -- open logs when build succeeded auto_open_on_failed_build = true, -- open logs when build failed auto_close_on_app_launch = false, -- close logs when app is launched auto_close_on_success_build = false, -- close logs when build succeeded (only if auto_open_on_success_build=false) auto_focus = true, -- focus logs buffer when opened filetype = "", -- file type set for buffer with logs open_command = "silent botright 20split {path}", -- command used to open logs panel. You must use {path} variable to load the log file logs_formatter = "xcbeautify --disable-colored-output --disable-logging", -- command used to format logs, you can use "" to skip formatting only_summary = false, -- if true logs won't be displayed, just xcodebuild.nvim summary live_logs = true, -- if true logs will be updated in real-time show_warnings = true, -- show warnings in logs summary notify = function(message, severity) -- function to show notifications from this module (like "Build Failed") vim.notify(message, severity) end, notify_progress = function(message) -- function to show live progress (like during tests) vim.cmd("echo '" .. message .. "'") end, }, console_logs = { enabled = true, -- enable console logs in dap-ui format_line = function(line) -- format each line of logs return line end, filter_line = function(line) -- filter each line of logs return true end, }, marks = { show_signs = true, -- show each test result on the side bar success_sign = "✔", -- passed test icon failure_sign = "✖", -- failed test icon show_test_duration = true, -- show each test duration next to its declaration show_diagnostics = true, -- add test failures to diagnostics }, quickfix = { show_errors_on_quickfixlist = true, -- add build/test errors to quickfix list show_warnings_on_quickfixlist = true, -- add build warnings to quickfix list }, test_explorer = { enabled = true, -- enable Test Explorer auto_open = true, -- open Test Explorer when tests are started auto_focus = true, -- focus Test Explorer when opened open_command = "botright 42vsplit Test Explorer", -- command used to open Test Explorer, must create a buffer with "Test Explorer" name open_expanded = true, -- open Test Explorer with expanded classes success_sign = "✔", -- passed test icon failure_sign = "✖", -- failed test icon progress_sign = "…", -- progress icon (only used when animate_status=false) disabled_sign = "⏸" -- disabled test icon } }) ``` -------------------------------- ### Debugging Selected Tests with nvim-dap (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Starts the debugger and runs the tests that are currently selected. ```Lua M.debug_selected_tests() ``` -------------------------------- ### Install External Dependencies (Bash) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt This command installs the primary external tools required by xcodebuild.nvim using Homebrew, RubyGems, and Pipx. It includes tools like xcode-build-server, xcbeautify, Xcodeproj, pymobiledevice3, jq, rg, and coreutils. ```Bash brew install xcode-build-server xcbeautify ruby pipx rg jq coreutils gem install xcodeproj pipx install pymobiledevice3 ``` -------------------------------- ### Select Xcode Project (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Starts a picker interface allowing the user to select a different project file within the current workspace or directory. Accepts an optional callback function `callback`. ```Lua M.select_project({callback}) ``` -------------------------------- ### Run Selected Xcode Tests (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Starts tests that have been previously selected, likely through a UI element or configuration. ```Lua M.run_selected_tests() ``` -------------------------------- ### Debugging Single Test with nvim-dap (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Starts the debugger and runs the current test function. ```Lua M.debug_func_test() ``` -------------------------------- ### Show Help - Test Explorer - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Shows the help documentation with available mappings for the Test Explorer. ```Lua M.show_help() ``` -------------------------------- ### Sending Tests Started Notification Xcodebuild Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Sends a message that tests have been started. ```Lua M.send_tests_started() ``` -------------------------------- ### Check if xcode-build-server is Installed (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Checks whether the `xcode-build-server` executable is installed and available. ```Lua M.is_installed() ``` -------------------------------- ### Setup neo-tree Integration (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Sets up the integration with the `neo-tree` plugin. This involves subscribing to `neo-tree` events. ```Lua M.setup() ``` -------------------------------- ### Select Xcode Test Plan (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Starts a picker interface allowing the user to select a specific test plan to execute. Accepts an optional callback function `callback` which receives the selected test plan name as a string. ```Lua M.select_testplan({callback}) ``` -------------------------------- ### Setup oil.nvim Integration (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Sets up the integration with the `oil.nvim` plugin. This involves subscribing to `oil.nvim` events. ```Lua M.setup() ``` -------------------------------- ### Getting Project Information (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Returns comprehensive project information including schemes, configurations, and targets for the given project file asynchronously via a callback. The callback receives an XcodeProjectInfo object. ```Lua M.get_project_information({projectFile}, {workingDirectory}, {callback}) ``` -------------------------------- ### Getting Destinations (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Returns a list of devices which match project requirements asynchronously via a callback function. The callback receives an array of XcodeDevice objects. ```Lua M.get_destinations({projectFile}, {scheme}, {workingDirectory}, {callback}) ``` -------------------------------- ### Debugging Failing Tests with nvim-dap (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Starts the debugger and re-runs the tests that previously failed. ```Lua M.debug_failing_tests() ``` -------------------------------- ### Install pymobiledevice3 Tool (Bash) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt This command uses pip to install or upgrade the `pymobiledevice3` Python package, which is a required dependency for the `xcodebuild.platform.device_proxy` module to function correctly and interact with iOS devices. ```bash python3 -m pip install -U pymobiledevice ``` -------------------------------- ### Show Xcode Previews (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Displays the previously generated preview. ```Lua M.previews_show() ``` -------------------------------- ### Getting Program Path (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Returns the file system path to the built application executable. ```Lua M.get_program_path() ``` -------------------------------- ### Setting Up Test Diagnostics Highlights Xcodebuild Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Set up highlights for tests. ```Lua M.setup() ``` -------------------------------- ### Build Project for Preview (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Initiates a build of the Xcode project specifically for preview purposes. Refer to the `xcodebuild.core.xcode.build_project` function for underlying build details. ```Lua M.build_project_for_preview() ``` -------------------------------- ### Getting Schemes (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Returns a list of scheme names (strings) for the given project asynchronously via a callback function. The callback receives an array of scheme names. ```Lua M.get_schemes({projectFile}, {workingDirectory}, {callback}) ``` -------------------------------- ### Start iOS Device Proxy Server (iOS < 17) - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Starts a proxy server on an iOS device running a version below 17. This process must remain active during the debugging session and can be stopped using `vim.fn.jobstop({job_id})`. The callback provides a connection string for `codelldb`. ```lua M.start_server({destination}, {port}, {callback}) ``` -------------------------------- ### Check if Swift Parser is Installed (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Checks whether the Swift parser, required for Quick test parsing, is installed via `nvim-treesitter`. The result is cached. ```Lua M.is_swift_parser_installed() ``` -------------------------------- ### Run Xcode Class Tests (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Starts tests contained within the class file currently open under the cursor in Neovim. ```Lua M.run_class_tests() ``` -------------------------------- ### Check String Has Prefix xcodebuild.util Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Determines if a given string starts with a specific prefix string. Requires the main string and the prefix string as parameters. Returns true if the string starts with the prefix, false otherwise. ```Lua M.has_prefix({text}, {prefix}) ``` -------------------------------- ### Getting DAP Actions List (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Returns a table containing a list of available debugger actions, each with a name and a corresponding function, suitable for use with nvim-dap. ```Lua M.get_actions() ``` -------------------------------- ### Getting Test Plans (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Returns a list of test plan names (strings) for the given project and scheme asynchronously via a callback function. The callback receives an array of test plan names. ```Lua M.get_testplans({projectFile}, {scheme}, {callback}) ``` -------------------------------- ### Getting Codelldb DAP Adapter (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Returns the nvim-dap adapter configuration table for the codelldb debugger. Requires the path to the codelldb binary and optionally accepts the LLDB path and a port. ```Lua require("dap").adapters.codelldb = require("xcodebuild.integrations.dap") .get_codelldb_adapter("path/to/codelldb") ``` -------------------------------- ### Run Xcode App (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Launches the app on the selected device or simulator. Accepts an optional callback function `callback`. ```Lua M.run({callback}) ``` -------------------------------- ### Run Current Xcode Target Tests (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Starts tests specifically associated with the current target in the Xcode project. ```Lua M.run_target_tests() ``` -------------------------------- ### Build Project - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Builds the Xcode project with optional parameters. Updates the quickfix list, writes logs, and sends notifications upon completion. ```Lua M.build_project({opts}, {callback}) ``` -------------------------------- ### Setup - Test Explorer - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Sets up the Test Explorer module. It attempts to load the last test report if one is available. ```Lua M.setup() ``` -------------------------------- ### Write Build Logs - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Writes the provided list of strings representing the build logs (including plugin summary) to disk. ```Lua M.write_build_logs({data}) ``` -------------------------------- ### Selecting Next Device (xcodebuild.nvim Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Selects the next available device or simulator in the list of connected/configured devices for running builds or tests. ```Lua M.select_next_device() ``` -------------------------------- ### Setting up XcodebuildNvimPreview in UIKit App Delegate Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Shows how to set up `XcodebuildNvimPreview` within a UIKit application's `application(_:didFinishLaunchingWithOptions:)` method using `XcodebuildNvimPreview.setup(view:)`. It also includes an optional example of integrating hot reload functionality using `Inject` and Combine. ```Swift import XcodebuildNvimPreview func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // ... XcodebuildNvimPreview.setup(view: MainView()) // (optional) enable hot reload for preview (requires integration with `Inject`) observeHotReload() .sink { XcodebuildNvimPreview.setup(view: HomeView()) } .store(in: &cancellables) return true } ``` -------------------------------- ### Boot Simulator (Xcodebuild Core Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Boots the simulator and launches the Simulator app if necessary. Requires destination and an optional callback function that receives a success boolean. Returns the job ID. ```Lua M.boot_simulator({destination}, {callback}) ``` -------------------------------- ### Launch macOS Application - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Launches a specified application on the macOS platform. This function simply starts the application process without attaching a debugger. An optional callback can be provided. ```lua M.launch_app({appPath}, {callback}) ``` -------------------------------- ### Showing Code Actions (xcodebuild.nvim Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Displays a list of available code actions for the current line. These actions provide context-aware refactoring or code generation options. ```Lua M.show_code_actions() ``` -------------------------------- ### Setting up XcodebuildNvimPreview in SwiftUI App Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Demonstrates how to integrate `XcodebuildNvimPreview` into a SwiftUI application's main `App` struct using the `.setupNvimPreview` modifier on a `View`. This allows the specified view (`HomeView` in the example) to be used for preview generation. ```Swift import SwiftUI import XcodebuildNvimPreview @main struct MyApp: App { var body: some Scene { WindowGroup { MainView() .setupNvimPreview { HomeView() } } } } ``` -------------------------------- ### Configuring nvim-dap with xcodebuild.nvim (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt This Lua snippet provides a sample configuration for the `nvim-dap` plugin to integrate with `xcodebuild.nvim`. It demonstrates how to require the `xcodebuild.integrations.dap` module, set the path to the `codelldb` adapter, and define key mappings for common debugging actions like building and debugging, debugging tests, and toggling breakpoints. It requires `nvim-dap` and `xcodebuild.nvim` plugins to be installed. ```Lua return { "mfussenegger/nvim-dap", dependencies = { "wojciech-kulik/xcodebuild.nvim" }, config = function() local xcodebuild = require("xcodebuild.integrations.dap") -- SAMPLE PATH, change it to your local codelldb path local codelldbPath = "/YOUR_PATH/codelldb-aarch64-darwin/extension/adapter/codelldb" xcodebuild.setup(codelldbPath) vim.keymap.set("n", "dd", xcodebuild.build_and_debug, { desc = "Build & Debug" }) vim.keymap.set("n", "dr", xcodebuild.debug_without_build, { desc = "Debug Without Building" }) vim.keymap.set("n", "dt", xcodebuild.debug_tests, { desc = "Debug Tests" }) vim.keymap.set("n", "dT", xcodebuild.debug_class_tests, { desc = "Debug Class Tests" }) vim.keymap.set("n", "b", xcodebuild.toggle_breakpoint, { desc = "Toggle Breakpoint" }) vim.keymap.set("n", "B", xcodebuild.toggle_message_breakpoint, { desc = "Toggle Message Breakpoint" }) vim.keymap.set("n", "dx", xcodebuild.terminate_session, { desc = "Terminate Debugger" }) end, } ``` -------------------------------- ### Notifying Tests Started - Xcodebuild.nvim - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Signals the beginning of a test run. This action triggers the `XcodebuildTestsStarted` autocommand and clears the `xcodebuild_last_status` global variable. It takes no parameters. ```Lua M.tests_started() ``` -------------------------------- ### Starting Build Timer - Xcodebuild.nvim - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Initiates a timer for a build process. This function is part of the notification system and returns a unique ID for the current build. The parameter indicates if the build is specifically for testing. ```Lua M.start_build_timer({buildForTesting}) ``` -------------------------------- ### Get Tool Path - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Returns the file path to a specific tool used by the plugin, identified by its name. ```Lua M.tool_path({name}) ``` -------------------------------- ### Run Nearest Xcode Test (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Starts the test case or test method declaration nearest to the current cursor position, searching upwards in the file. ```Lua M.run_nearest_test() ``` -------------------------------- ### Getting Build Settings (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Returns the build settings for the specified platform, project, scheme, and xcodeproj path asynchronously via a callback. Sends an error notification if settings are not found. The callback receives an XcodeBuildSettings object. ```Lua M.get_build_settings({platform}, {projectFile}, {scheme}, {xcodeprojPath}, {callback}) ``` -------------------------------- ### Build and Run App - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Builds the Xcode project and then runs the resulting application on a connected device or simulator. Optionally waits for a debugger and accepts a callback function. ```Lua M.build_and_run_app({waitForDebugger}, {callback}) ``` -------------------------------- ### Install and Secure remote_debugger Script (Bash) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Installs the `remote_debugger` script to a secure location, changes its ownership and permissions to root, and adds a passwordless sudo entry for the current user specifically for this script, enabling secure remote debugging on iOS 17+. ```bash DEST="$HOME/Library/xcodebuild.nvim" && \ SOURCE="$HOME/.local/share/nvim/lazy/xcodebuild.nvim/tools/remote_debugger" && \ ME="$(whoami)" && \ sudo install -d -m 755 -o root "$DEST" && \ sudo install -m 755 -o root "$SOURCE" "$DEST" && \ sudo bash -c "echo \"$ME ALL = (ALL) NOPASSWD: $DEST/remote_debugger\" >> /etc/sudoers" ``` -------------------------------- ### Waiting for Process ID (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Waits for the application process to start and returns its Process ID (PID) within a coroutine. ```Lua M.wait_for_pid() ``` -------------------------------- ### Setup Code Coverage - xcodebuild.code_coverage.coverage - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Initializes the code coverage visualization features within the editor, including setting up signs and highlights to indicate coverage status. ```Lua M.setup() ``` -------------------------------- ### Install and Protect Automatic Offline Script (Bash) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Provides a bash command to install the xcodebuild_offline script to a protected location, change its ownership to root, and configure passwordless sudo access for the current user to execute this specific script. This is required for the automatic integration. ```bash DEST="$HOME/Library/xcodebuild.nvim" && \ SOURCE="$HOME/.local/share/nvim/lazy/xcodebuild.nvim/tools/xcodebuild_offline" && \ ME="$(whoami)" && \ sudo install -d -m 755 -o root "$DEST" && \ sudo install -m 755 -o root "$SOURCE" "$DEST" && \ sudo bash -c "echo \"$ME ALL = (ALL) NOPASSWD: $DEST/xcodebuild_offline\" >> /etc/sudoers" ``` -------------------------------- ### Getting Targets File Map (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Returns a map of targets to file paths based on SwiftFileList files in the build directory. Returns an empty map if the build directory is not found. ```Lua M.get_targets_filemap({derivedDataPath}) ``` -------------------------------- ### Build and Run Xcode Project (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Builds and runs the project. Accepts an optional callback function `callback` which receives a `ParsedReport` upon completion. ```Lua M.build_and_run({callback}) ``` -------------------------------- ### Select Scheme in Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Displays a picker listing the available schemes for the current project. The selected scheme string is passed to the provided callback function. ```Lua M.select_scheme({callback}, {opts}) ``` -------------------------------- ### Get Failing Snapshots - xcodebuild.tests.snapshots - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Retrieves a sorted list of file paths pointing to the generated snapshot diff images for failing tests. Returns an array of strings. ```Lua M.get_failing_snapshots() ``` -------------------------------- ### Selecting Previous Device (xcodebuild.nvim Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Selects the previous available device or simulator in the list of connected/configured devices for running builds or tests. ```Lua M.select_previous_device() ``` -------------------------------- ### Getting Project Targets (xcodebuild.nvim Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Retrieves a list of all targets defined in the current Xcode project. Returns an array of strings representing the target names, or nil if targets cannot be retrieved. ```Lua M.get_project_targets() ``` -------------------------------- ### Launch and Debug macOS Application - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Launches a specified application on macOS and simultaneously attaches a debugger. This function is used to start a debugging session for a macOS application. An optional callback can be provided. ```lua M.launch_and_debug({appPath}, {callback}) ``` -------------------------------- ### Showing Project Manager Actions (xcodebuild.nvim Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Displays a list of all available actions related to the project manager functionality. This provides a quick overview of possible project manipulation operations. ```Lua M.show_project_manager_actions() ``` -------------------------------- ### Getting Swift DAP Configuration (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Returns the nvim-dap configuration table specifically for debugging Swift using codelldb. This configuration can be assigned to `require("dap").configurations.swift`. ```Lua require("dap").configurations.swift = require("xcodebuild.integrations.dap").get_swift_configuration() ``` -------------------------------- ### Creating New File (xcodebuild.nvim Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Initiates the process to create a new file in the project. The user will be prompted to provide the file name and select which targets the new file should be added to. ```Lua M.create_new_file() ``` -------------------------------- ### Subscribe to Xcodebuild Event - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Example demonstrating how to subscribe to a specific xcodebuild.nvim event, `XcodebuildTestsFinished`, using Neovim's autocommand system. The callback function receives event data, such as test counts, allowing customization based on build or test outcomes. ```lua vim.api.nvim_create_autocmd("User", { pattern = "XcodebuildTestsFinished", callback = function(event) print("Tests finished (passed: " .. event.data.passedCount .. ", failed: " .. event.data.failedCount .. ")" ) end, }) ``` -------------------------------- ### Launching Application on Device (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Launches the application with the given bundle identifier on a specific device destination. An optional callback can be provided. ```Lua M.launch_app_on_device({destination}, {bundleId}, {callback}) ``` -------------------------------- ### Notify Build Started Event - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Notifies the system that a build process has commenced. This triggers the `XcodebuildBuildStarted` autocommand and clears the `xcodebuild_last_status` global variable, indicating a new build cycle has begun. ```lua M.build_started({forTesting}) ``` -------------------------------- ### Run xcode-build-server Config (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Calls the "config" command of `xcode-build-server` to update the `buildServer.json` file. Parameters: - projectFile: The path to the project file. - scheme: The scheme to use for configuration. ```Lua M.run_config({projectFile}, {scheme}) ``` -------------------------------- ### Check If fd Installed xcodebuild.util Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Determines whether the 'fd' command-line utility is available on the system. Returns a boolean value: true if 'fd' is found, false otherwise. ```Lua M.is_fd_installed() ``` -------------------------------- ### Initialize Run Arguments File - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Initializes the file used to store run arguments (.nvim/xcodebuild/run_args.txt) if it doesn't exist. ```Lua M.initialize_run_args() ``` -------------------------------- ### Read Build Logs - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Reads the build logs from disk, which include the summary generated by the plugin. Returns a list of strings. ```Lua M.read_build_logs() ``` -------------------------------- ### Select Project File in Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Shows a picker allowing selection among .xcworkspace, .xcodeproj, and Package.swift files. The provided callback function will receive the path of the selected project file. ```Lua M.select_project({callback}, {opts}) ``` -------------------------------- ### Get App PID (Xcodebuild Core Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Gets the process ID (PID) of the application. This function only works with a simulator. Requires the product name and an optional platform ID. Returns the PID or nil. ```Lua M.get_app_pid({productName}, {platform}) ``` -------------------------------- ### Get Filename From Path xcodebuild.util Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Extracts the filename part from a given file path string. Requires the full file path as a string. Returns the filename as a string. ```Lua M.get_filename({filepath}) ``` -------------------------------- ### Get Test Key For File - Test Search - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Similar to `M.get_test_key`, but first uses the provided `filepath` to determine the relevant target before generating the test key based on the target and `class`. ```Lua M.get_test_key_for_file({filepath}, {class}) ``` -------------------------------- ### Showing Current File Targets (xcodebuild.nvim Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Displays a picker interface listing the targets that the current file belongs to. This helps in understanding the file's inclusion in different parts of the project. ```Lua M.show_current_file_targets() ``` -------------------------------- ### Building Project (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Initiates a build operation for the project using the provided XcodeBuildOptions. Returns the job ID of the build process. ```Lua M.build_project({opts}) ``` -------------------------------- ### Get Buffers By Matching Name xcodebuild.util Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Retrieves a list of all buffers whose names match the provided pattern. Requires a string pattern. Returns an array of objects, where each object contains the buffer number (`bufnr`) and file path (`file`). ```Lua M.get_bufs_by_matching_name({pattern}) ``` -------------------------------- ### Rerun Failed Xcode Tests (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Starts only the tests that failed during the most recent test run. ```Lua M.rerun_failed_tests() ``` -------------------------------- ### Get All Project Targets (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Retrieves and returns a list of all targets defined within the current Xcode project. The function returns an array of strings representing the target names or `nil` if no targets are found or an error occurs. ```Lua M.get_project_targets() ``` -------------------------------- ### Initialize Environment Variables File - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Initializes the file used to store environment variables (.nvim/xcodebuild/env.txt) if it doesn't exist. ```Lua M.initialize_env_vars() ``` -------------------------------- ### Select Test Plan in Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Shows a picker with the available test plans for the project. The selected test plan string (or nil) is passed to the callback. It returns a number ID if the picker is launched. ```Lua M.select_testplan({callback}, {opts}) ``` -------------------------------- ### Write Original Xcode Logs - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Writes the provided list of strings representing the original Xcode logs to disk. ```Lua M.write_original_logs({data}) ``` -------------------------------- ### Create App Data Directory - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Creates the plugin's application data directory (.nvim/xcodebuild) within the project if it does not already exist. ```Lua M.create_app_dir() ``` -------------------------------- ### Show Current Xcode Configuration (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Sends a notification within Neovim displaying the currently selected project, scheme, and device/simulator settings. ```Lua M.show_current_config() ``` -------------------------------- ### Select Xcode Project in Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Displays a picker specifically for selecting a .xcodeproj file from the available options. It takes a callback function that receives the selected .xcodeproj path and optional picker options. ```Lua M.select_xcodeproj({callback}, {opts}) ``` -------------------------------- ### Load Last Report and Update UI - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Loads the last test report from disk, updates the quickfix list and diagnostics in Neovim, and sets the internal report state. ```Lua M.load_last_report() ``` -------------------------------- ### Get Test Key - Test Search - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Generates a unique string key for a test based on its optional `target` and `class`. The format is typically `Target:Class`, but can be `:Class` if the target is empty, or just `Class` if target matching is disabled in the configuration. ```Lua M.get_test_key({target}, {class}) ``` -------------------------------- ### Show Xcode Test Explorer (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Displays the test explorer view, which lists tests and their results. ```Lua M.test_explorer_show() ``` -------------------------------- ### Run Tests (Xcodebuild Core Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Runs tests with the specified options. Requires XcodeTestOptions. Returns the job ID. ```Lua M.run_tests({opts}) ``` -------------------------------- ### Show Failing Xcode Snapshot Tests (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Displays a picker interface listing snapshot tests that failed, allowing the user to inspect or update them. ```Lua M.show_failing_snapshot_tests() ``` -------------------------------- ### Show Xcode Code Coverage Report (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Displays the detailed code coverage report generated from a test run. ```Lua M.show_code_coverage_report() ``` -------------------------------- ### Get Code Coverage (Xcodebuild Core Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Retrieves code coverage data for a specific file path from an xcresult bundle. Requires the path to the xcresult bundle, the file path to check, and a callback function that receives an array of strings representing coverage data. Returns the job ID. ```Lua M.get_code_coverage({xctestresultPath}, {filepath}, {callback}) ``` -------------------------------- ### Create Secure Tunnel to iOS Device (iOS 17+) - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Creates a secure tunnel to an iOS device running iOS 17 or later. This is a prerequisite for starting the secure server (`start_secure_server`) and requires passwordless `sudo` for the `remote_debugger` tool. The process must stay alive during debugging and cannot be stopped with `vim.fn.jobstop`. ```lua M.create_secure_tunnel({destination}, {callback}) ``` -------------------------------- ### Write Test Report - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Writes the given parsed test report object to disk. ```Lua M.write_report({report}) ``` -------------------------------- ### Starting Neovim with Custom Config Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/CONTRIBUTING.md This shell command demonstrates how to launch Neovim using a configuration located in a different directory than the default `~/.config/nvim`. This is useful for isolating development environments or testing configurations. ```Shell NVIM_APPNAME=nvim-dev nvim ``` -------------------------------- ### Toggle Xcode Previews (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Toggles the visibility of the preview display. ```Lua M.previews_toggle() ``` -------------------------------- ### Adding Current File (xcodebuild.nvim Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Adds the file currently open in the buffer to the Xcode project. This action integrates the existing file into the project structure. ```Lua M.add_current_file() ``` -------------------------------- ### Showing Assets Manager (xcodebuild.nvim Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Displays the Assets Manager interface. This provides access to manage assets within the Xcode project. ```Lua M.show_assets_manager() ``` -------------------------------- ### Applying Quick Fix (xcodebuild.nvim Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Attempts to automatically apply a suggested fix for the code issue on the current line. This leverages diagnostic information to resolve common errors. ```Lua M.quickfix_line() ``` -------------------------------- ### Notifying Application Launched - Xcodebuild.nvim - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Notifies that the application associated with the build/test process has been launched. This action triggers the `XcodebuildApplicationLaunched` autocommand. It does not take any parameters. ```Lua M.application_launched() ``` -------------------------------- ### Jump to Next Coverage - xcodebuild.code_coverage.coverage - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Navigates the cursor to the next location in the current buffer that has a code coverage sign. ```Lua M.jump_to_next_coverage() ``` -------------------------------- ### Check if Quick Integration is Enabled (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Returns whether the Quick test framework integration is currently enabled. ```Lua M.is_enabled() ``` -------------------------------- ### Creating New Group (xcodebuild.nvim Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Initiates the process to create a new group (folder) in the project navigator. The user will be prompted to provide the name for the new group. ```Lua M.create_new_group() ``` -------------------------------- ### Variable - Targets Files Map - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt A hash map storing all targets and their associated files. The type is `TargetMap`. ```Lua M.targetsFilesMap ``` -------------------------------- ### Jump to Next Xcode Coverage Marker (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Navigates the cursor to the next line in the current buffer that has a code coverage marker. ```Lua M.jump_to_next_coverage() ``` -------------------------------- ### Loading Breakpoints (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Loads breakpoints from `.nvim/xcodebuild/breakpoints.json` and sets them in a specific buffer or all loaded buffers if no buffer number is provided. ```Lua M.load_breakpoints({bufnr}) ``` -------------------------------- ### Launch App on Device (Xcodebuild Core Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Launches the application on a specific device destination. Requires destination, bundle ID, and an optional callback. Returns the job ID. ```Lua M.launch_app_on_device({destination}, {bundleId}, {callback}) ``` -------------------------------- ### Uninstall Xcode App (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Uninstalls the application from the currently selected device or simulator. Accepts an optional callback function `callback`. ```Lua M.uninstall_app({callback}) ``` -------------------------------- ### Repeat Last Run - Test Runner - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Repeats the test run that was executed most recently. ```Lua M.repeat_last_test_run() ``` -------------------------------- ### Write Test Explorer Data - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Writes the provided Test Explorer data structure (a list of nodes) to disk. ```Lua M.write_test_explorer_data({report}) ``` -------------------------------- ### Load Targets Map - Test Search - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Loads the `M.targetsFilesMap` variable based on the project's build folder structure. ```Lua M.load_targets_map() ``` -------------------------------- ### Jump to Previous Xcode Coverage Marker (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Navigates the cursor to the previous line in the current buffer that has a code coverage marker. ```Lua M.jump_to_previous_coverage() ``` -------------------------------- ### Setting up DAP Integration (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Configures the nvim-dap adapter and Swift configuration for xcodebuild.nvim. Requires the path to the codelldb binary and optionally allows specifying the LLDB path and whether to load breakpoints automatically. ```Lua M.setup({codelldbPath}, {loadBreakpoints}, {lldbPath}) ``` -------------------------------- ### Jump to Previous Coverage - xcodebuild.code_coverage.coverage - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Navigates the cursor to the previous location in the current buffer that has a code coverage sign. ```Lua M.jump_to_previous_coverage() ``` -------------------------------- ### Toggling Breakpoint (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Toggles a standard breakpoint on the current line and automatically saves all breakpoints to disk. ```Lua M.toggle_breakpoint() ``` -------------------------------- ### Show Coverage Report - xcodebuild.code_coverage.coverage - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Displays a summary report of the code coverage data. The exact format or location of the report is not specified but is likely within Neovim. ```Lua M.show_report() ``` -------------------------------- ### Repeat Last Xcode Test Run (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Repeats the exact same set of tests that were executed in the previous test run. ```Lua M.repeat_last_test_run() ``` -------------------------------- ### Read Original Xcode Logs - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Reads the raw, original Xcode build or test logs from disk. Returns a list of strings. ```Lua M.read_original_logs() ``` -------------------------------- ### Finding Schemes (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Returns a list of schemes (XcodeScheme objects) for the given project asynchronously via a callback function. The callback receives an array of XcodeScheme objects. ```Lua M.find_schemes({xcodeprojPath}, {workingDirectory}, {callback}) ``` -------------------------------- ### Refresh All Coverage Buffers - xcodebuild.code_coverage.coverage - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Updates the code coverage visualization for all open editor buffers that match the configured file pattern. ```Lua M.refresh_all_buffers() ``` -------------------------------- ### Show Failing Snapshot Tests - Test Runner - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Displays a picker interface listing only the snapshot tests that failed in the last run. ```Lua M.show_failing_snapshot_tests() ``` -------------------------------- ### Sending Project Settings Notification Xcodebuild Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Sends the project settings. Parameters: {settings} (ProjectSettings) the project settings. ```Lua M.send_project_settings({settings}) ``` -------------------------------- ### Read Run Arguments - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Reads the run arguments stored on disk. Returns a list of strings or nil if the file is not found or empty. ```Lua M.read_run_args() ``` -------------------------------- ### Running Selected Tests (xcodebuild.nvim Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Runs the tests that have been specifically selected within the test explorer interface. This action allows users to execute a subset of their test suite. ```Lua M.test_explorer_run_selected_tests() ``` -------------------------------- ### Sending Warning Notification Xcodebuild Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Forwards the notification to the callback from the config. Parameters: {message} (string) the message to send. ```Lua M.send_warning({message}) ``` -------------------------------- ### Append App Logs - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Appends the given list of strings to the application logs file and updates the DAP console with the new output. ```Lua M.append_app_logs({output}) ``` -------------------------------- ### Launch App on Simulator (Xcodebuild Core Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Launches the application on a simulator destination. Streams logs to file and DAP console. Requires destination, bundle ID, a boolean to wait for debugger, and an optional callback. Returns the job ID. ```Lua M.launch_app_on_simulator({destination}, {bundleId}, {waitForDebugger}, {callback}) ``` -------------------------------- ### Finding Derived Data Path (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Returns the derived data path for a Swift Package matching the product name and working directory. Returns nil if not found. ```Lua M.find_derived_data_path({productName}, {workingDirectory}) ``` -------------------------------- ### Uninstall App (Xcodebuild Core Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Uninstalls the application on a given platform and destination. Requires platform, destination, bundle ID, and an optional callback. Returns the job ID. ```Lua M.uninstall_app({platform}, {destination}, {bundleId}, {callback}) ``` -------------------------------- ### Type Definition - Test Provider Options - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Defines the options structure used when finding tests. Fields include `selectedTests`, `currentTest`, and `failingTests`, all optional booleans. ```Lua TestProviderOptions ``` -------------------------------- ### Generate and Show Xcode Previews (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Generates and then displays the preview for SwiftUI or other previewable content. If `hotReload` is true, the app will be kept running. Accepts optional boolean `hotReload` and optional callback function `callback`. ```Lua M.previews_generate_and_show({hotReload}, {callback}) ``` -------------------------------- ### Reload Tests - Test Runner - Lua Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Initiates the process to rebuild the application, enumerate available tests, and load them into the Test Explorer interface. ```Lua M.reload_tests() ``` -------------------------------- ### Running Function Test (xcodebuild.nvim Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Runs a test related to the current function. This action is deprecated and `run_nearest_test` should be used instead. ```Lua M.run_func_test() ``` -------------------------------- ### Running Failing Tests (xcodebuild.nvim Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Runs tests that previously failed. This action is deprecated and `rerun_failed_tests` should be used instead. ```Lua M.run_failing_tests() ``` -------------------------------- ### Uninstall App from Simulator (Xcodebuild Core Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Uninstalls the application from a simulator destination. Requires destination, bundle ID, and an optional callback. Returns the job ID. ```Lua M.uninstall_app_from_simulator({destination}, {bundleId}, {callback}) ``` -------------------------------- ### Configuring pymobiledevice Integration (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Updates the xcodebuild.nvim configuration to enable the pymobiledevice integration, which is required for debugging on iOS 17+ devices. ```lua integrations = { pymobiledevice = { enabled = true, }, } ``` -------------------------------- ### Kill App (Xcodebuild Core Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Kills the application process. This function only works with a simulator. Requires the product name, an optional platform ID, and an optional callback. ```Lua M.kill_app({productName}, {platform}, {callback}) ``` -------------------------------- ### Registering DAP User Commands (Lua) Source: https://github.com/wojciech-kulik/xcodebuild.nvim/blob/main/doc/xcodebuild.txt Registers custom Neovim user commands for interacting with the DAP integration, such as `XcodebuildAttachDebugger`, `XcodebuildDetachDebugger`, `XcodebuildBuildDebug`, and `XcodebuildDebug`. ```Lua M.register_user_commands() ```