Munyon-Canyon

ios-feature

Generates boilerplate Swift code for a new iOS mobile screen, including model, view, route, and test files. Run from repo root with a domain name to scaffold a feature.

Munyon-Canyon 0 Updated 2w ago
GitHub

Install

npx skillscat add munyon-canyon/monaco/ios-feature

Install via the SkillsCat registry.

About this skill

Generates boilerplate Swift code for a new iOS mobile screen, including model, view, route, and test files. Run from repo root with a domain name to scaffold a feature.

SKILL.md

iOS feature

Start from the generator, then swap the ping calls for the screen's operation. The rules are in iOS architecture. The recipe is Add a mobile feature. This page is only the generator.

Run from the repo root:

scripts/gen-mobile-feature.sh <Domain>

<Domain> is UpperCamelCase. The script refuses a name that is not, and it refuses a domain that already has a folder.

File What it is Which tests run it
packages/mobile-core/Sources/MonacoCore/<Domain>/<Domain>Model.swift @Observable model swift test
packages/mobile-core/Tests/MonacoCoreTests/<Domain>ModelTests.swift Host tests swift test
apps/mobile/Monaco/Features/<Domain>/<Domain>View.swift SwiftUI binding just build mobile
apps/mobile/Monaco/Features/<Domain>/<Domain>Route.swift AppRoute for the screen just build mobile
apps/mobile/Monaco/Features/<Domain>/<Domain>SampleHarness.swift SampleHarnessEntry subclass MonacoTests when a UI test launches it
packages/mobile-core/Sources/MonacoAPI/Fixtures/<Domain>+Sample.swift DEBUG sample value swift test

The copy still calls postSystemPing and getSystemPing. Replace those with the screen's operation, then delete the ping-only assertions that no longer apply.

Categories