fosmvvm-swiftui-app-setup

Generate a FOSMVVM SwiftUI App struct wired to MVVMEnvironment.

3|2|Updated Apr 9, 2023
One-click install
npx skills add https://github.com/foscomputerservices/FOSUtilities --skill fosmvvm-swiftui-app-setup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fosmvvm-swiftui-app-setup
Source: https://github.com/foscomputerservices/FOSUtilities/tree/main/.claude/skills/fosmvvm-swiftui-app-setup
Command: npx skills add https://github.com/foscomputerservices/FOSUtilities --skill fosmvvm-swiftui-app-setup

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers bootstrap a FOSMVVM SwiftUI application by generating the main App struct wired to MVVMEnvironment, integrating localization/resource bundles, deployment URLs, and optional test infrastructure. It reduces boilerplate and ensures consistent setup across projects.

Core Features & Use Cases

  • MVVMEnvironment wiring: Configures appBundle, resourceBundles, and deploymentURLs for multiple environments.
  • App struct bootstrap: Provides a ready-to-run WindowGroup with environment injected.
  • Testing scaffolding: Optional DEBUG testHost and a registerTestingViews() extension for UI tests.
  • Migration & onboarding: Useful when starting a fresh FOSMVVM SwiftUI project or migrating an existing app to FOSMVVM.

Quick Start

To implement, instruct the AI to generate the App.swift setup with MVVMEnvironment and optional test infrastructure for your app.

Frequently Asked Questions about fosmvvm-swiftui-app-setup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I bootstrap a SwiftUI app with MVVMEnvironment for multiple targets?

Bootstrapping a SwiftUI app with MVVMEnvironment involves generating the main App struct wired to configure appBundle, resourceBundles, and deploymentURLs across multiple environments. This setup injects the environment directly into a ready-to-run WindowGroup.

How does environment injection work in a SwiftUI MVVM app setup?

Environment injection works by wiring MVVMEnvironment into the main App struct, passing configuration like deployment URLs and resource bundles down through the SwiftUI view hierarchy. This ensures consistent environment availability throughout the app.

Can I include UI testing infrastructure when setting up a SwiftUI app?

Yes, you can include UI testing infrastructure during setup by enabling optional DEBUG testHost configurations. This provides a registerTestingViews() extension to scaffold and hook UI tests directly into the app bootstrap.

What is the best way to reduce SwiftUI boilerplate when migrating to FOSMVVM?

Migrating to FOSMVVM is streamlined by generating the main App struct pre-wired to MVVMEnvironment. This reduces boilerplate by automatically handling appBundle, resourceBundles, and deploymentURLs configuration for consistent project setup.

Do I need to manually configure deployment URLs in a SwiftUI app?

No, manual configuration of deployment URLs is unnecessary when using this bootstrap approach. The generated App struct automatically satisfies deploymentURLs requirements within the MVVMEnvironment for your targeted environments.