add_swift_package
Add a Swift Package dependency to your active Xcode project by URL and version. Prerequisite: SPM must be initialized with a Package.swift file; if not, initialize it first.
Instructions
Adds a Swift Package dependency to the active project. Note: Your project must already be set up for Swift Package Manager (must have a Package.swift file). If you haven't initialized SPM yet, use the init_swift_package tool first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The URL of the Swift package to add | |
| version | No | Version requirement (e.g., 'exact: 1.0.0', 'from: 1.0.0', 'branch: main') | |
| skipUpdate | No | Skip running 'package update' after adding the dependency | |
| productName | No | Specific product name to add from the package |