XBase: A Reliable Xcode Alternative
XBase is an innovative development environment designed to act as a practical alternative to Xcode for developing Apple software products. It is especially aimed at users looking for flexibility and features that fit within their preferred coding setups, such as using Neovim.
Overview
The key strength of XBase lies in its ability to handle Xcode projects and Swift packages directly from your favorite code editor. You can build, watch, and run projects on iOS, watchOS, and tvOS simulators. Moreover, its real-time logging and language server protocol (LSP) features, including auto-completion and code navigation, provide a smoother coding experience.
XBase comes equipped with built-in support for several Xcode project generators. With these, developers can bypass the need to open Xcode or manually edit the '*.xcodeproj' files when making changes to their projects. Although XBase is still a work in progress, it welcomes feedback and suggestions to enhance the development experience further.
Motivation
The motivation behind developing XBase was the need for a more open and keyboard-focused development environment than what Xcode offers. Originating from a vim/shell background, the creator sought to streamline the development process, minimizing the dependency on mouse-driven interfaces. By creating XBase, they aimed to improve the software production workflow, especially on Apple's operating systems.
Features
- Auto-Completion and Code Navigation: Automatically generates a compilation database upon directory changes, boosting sourcekit-lsp to offer better code navigation and symbol auto-completion.
- Multi-nvim Instance Support: Allows several Neovim instances to work simultaneously without process duplication, maintaining shared states.
- Automatic Background Daemon Management: The daemon starts or stops based on the number of connected Neovim client instances, ensuring efficient performance.
- Multi-Project Support: Developers can manage multiple projects at the same time within a single Neovim instance.
- Simulator and Real-Time Logging: Run projects on relevant simulators and get live logging for builds and runtime information.
- Light Resource Usage: XBase maintains low resource usage, using minimal RAM and CPU, making it a lightweight yet potent tool.
Generators
XBase supports two primary project generators: XcodeGen and Tuist. XcodeGen is considered simpler and is recommended for beginners with its YAML-based configuration. In contrast, Tuist offers a more feature-rich environment. Both generators allow automatic management of xcodeproj files without manual interference.
Requirements
Shared Requirements:
- Rust programming language version 1.60 or higher for compiling projects locally.
Neovim Requirements:
- Neovim version 0.7 or higher, along with necessary LSP integrations.
Installation
Installing XBase involves running a make command that builds the necessary binaries and places them into a specific directory. Users can incorporate XBase into their Neovim setup using various plugins like packer, vim-plug, or dein, ensuring seamless integration and accessibility.
Usage
Once installed, XBase automates much of the development process. Simply loading a project in Neovim with recognizable configuration files will start the necessary services, enabling developers to focus on coding. XBase also offers configurable shortcuts for ease of use.
Debugging
If issues arise, XBase provides comprehensive logging mechanisms. By inspecting these logs, developers can identify potential problems and troubleshoot effectively. In cases where server processes need handling manually, instructions are provided on how to stop them.
XBase continues to evolve, aiming to become the go-to tool for Apple software development, combining ease of use with a powerful feature set tailored for advanced users.