# Ddgutierrezc Legato Capacitor IOS Spm

> When to Use

- Skill: `tomevault-io/ddgutierrezc-legato-capacitor-ios-spm` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/ddgutierrezc-legato-capacitor-ios-spm`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/ddgutierrezc-legato-capacitor-ios-spm/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/ddgutierrezc-legato-capacitor-ios-spm

---


## When to Use

- When adding or fixing a Capacitor iOS plugin that must work with `npx cap sync ios`
- When `CapApp-SPM`, `packageClassList`, or `UNIMPLEMENTED` issues appear on iOS
- When comparing a local plugin package against official Capacitor / Capawesome SPM conventions

## Critical Patterns

- Follow the official Capacitor plugin SPM shape: standard `.library(...)`, no custom `type: .dynamic` unless proven necessary by upstream docs.
- Treat `ios/App/CapApp-SPM/Package.swift` as CLI-generated — never hand-edit it.
- The effective package/product naming is whatever `CapApp-SPM` requests; `Package.swift` in the plugin must expose the exact same package/product names.
- Keep plugin discovery class-based: `@objc(PluginClassName)` + `CAPPlugin, CAPBridgedPlugin` + `identifier`, `jsName`, `pluginMethods`.
- Verify `ios/App/App/capacitor.config.json` contains the plugin class in `packageClassList` after `npx cap sync ios`.
- For monorepo local path dependencies, validate `Package.swift` paths from the real consumer entrypoint (`node_modules/...`), not just from the plugin folder itself.
- Prefer official patterns from `create-capacitor-plugin`, Capacitor docs, and Capawesome plugins before introducing custom packaging behavior.
- If Xcode shows `Missing package product 'CapApp-SPM'`, inspect the real SwiftPM resolution error first; it is usually a downstream symptom.

## Commands

```bash
cd apps/capacitor-demo
npm run cap:sync
open "ios/App/App.xcodeproj"
xcodebuild -resolvePackageDependencies -project "apps/capacitor-demo/ios/App/App.xcodeproj"
```

## Resources

- OpenCode skills docs: use `.opencode/skills/<name>/SKILL.md` or compatible `.agents/skills/<name>/SKILL.md`
- Capacitor official plugin template: `create-capacitor-plugin`
- Capacitor plugin docs: `https://capacitorjs.com/docs/plugins/creating-plugins`

---
> Source: [ddgutierrezc/legato](https://github.com/ddgutierrezc/legato) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-05-23 -->

