Skip to content

ReposUniversity/sweetpad

 
 

Repository files navigation

SweetPad (iOS/Swift development)

📚 Documentation | 📦 VSCode Marketplace | 🐞 Github Issues | 🏔️ Roadmap

Develop Swift/iOS projects efficiently using VSCode or Cursor. SweetPad integrates essential iOS development tools to make VSCode/Cursor a viable alternative to Xcode.

iOS simulator

Features

Development

  • Autocomplete — Intelligent code completion using xcode-build-server
  • 💅🏼 Format — Format Swift files using swift-format or other formatters
  • 🔍 Periphery Scan — Detect unused code using Periphery with smart public API retention
  • 📦 Swift Package Manager — Full support for SPM package development and dependencies

Build & Run

  • 🛠️ Build & Run — Build and run applications using xcodebuild
  • 📱 Simulator — Create, manage and control iOS simulators
  • 📱 Devices — Deploy and run iOS applications on physical iPhone or iPad devices

Testing & Debugging

  • 🪲 Debug — Debug iOS applications using CodeLLDB
  • Tests — Run tests on simulators and devices with visual feedback
  • 🧪 Swift Testing — Support for Swift Testing framework (Xcode 16+) alongside XCTest

Tools

  • 🛠️ Tools — Manage essential iOS development tools using Homebrew
  • 🔍 Periphery Integration — Install and manage Periphery for unused code detection

Periphery Scan Usage

SweetPad integrates Periphery to help you identify unused code in your Swift projects:

Context Menu Integration:

  • Right-click on any scheme in the workspace tree
  • Select "Periphery Scan" for quick analysis
  • Select "Build & Periphery Scan" for full build + scan workflow
  • Select "Create Periphery Config" to generate a .periphery.yml configuration file

Configuration Options:

  • periphery.runAfterBuild — Automatically run scan after builds
  • periphery.retainPublic — Keep public APIs (enabled by default)
  • periphery.retainObjcAccessible — Keep Objective-C accessible code (enabled by default)
  • periphery.format — Output format (default: "xcode")

Configuration Priority:

  1. .periphery.yml in project root (checked first)
  2. Custom path specified in periphery.config setting
  3. User-prompted path selection
  4. Default settings if no configuration is found

Installation: Periphery is automatically managed through the Tools panel or install manually:

brew install periphery

💡 Have ideas or found issues? Please open an issue or start a discussion on the SweetPad GitHub repository.

Requirements

  1. 🍏 MacOS — Other platforms are currently not supported
  2. 📱 Xcode — Required for building and running iOS apps via xcodebuild

Installation

VSCode Marketplace

Install directly from the VSCode Marketplace.

Manual Installation

Download the latest .vsix file from GitHub Releases and install with:

code --install-extension sweetpad-[version].vsix
# or for Cursor
cursor --install-extension sweetpad-[version].vsix

Development

🛠️ Local Development Setup

  1. Clone the repository:
git clone git@github.com:KayodeOgundimu-DoorDashSWE/sweetpad.git
cd sweetpad
  1. Install dependencies:
npm install
  1. Open the project in Visual Studio Code:
code .
  1. Press F5 to build and run the extension in a new development window.

  2. Add breakpoints to the code where you want to debug.

  3. When you perform actions that trigger those breakpoints, the extension will pause, allowing you to inspect variables and the call stack.

Debugging

🔥 Build Locally

To build and test changes locally:

# Clone the repository
git clone https://github.com/KayodeOgundimu-DoorDashSWE/sweetpad.git
cd sweetpad

# Install dependencies
npm install

# Build and install the extension locally
./scripts/install-and-test.sh

What the build script does:

  1. 🔨 Builds the extension from source
  2. 📦 Creates a VSIX package with dynamic versioning
  3. 🚀 Installs the extension automatically in VS Code or Cursor
  4. 🔄 Reloads the editor window to activate the extension

Changelog

See CHANGELOG.md for all notable changes to the extension.

License

This extension is licensed under the MIT License.

About

Develop Swift/iOS projects using VSCode

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 98.3%
  • Shell 1.1%
  • JavaScript 0.6%