{
  "schemaVersion": "1.0",
  "item": {
    "slug": "fosmvvm-swiftui-app-setup",
    "name": "FOSMVVM SwiftUI App Setup",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/foscomputerservices/fosmvvm-swiftui-app-setup",
    "canonicalUrl": "https://clawhub.ai/foscomputerservices/fosmvvm-swiftui-app-setup",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/fosmvvm-swiftui-app-setup",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=fosmvvm-swiftui-app-setup",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "reference.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "slug": "fosmvvm-swiftui-app-setup",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-03T03:14:05.581Z",
      "expiresAt": "2026-05-10T03:14:05.581Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=fosmvvm-swiftui-app-setup",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=fosmvvm-swiftui-app-setup",
        "contentDisposition": "attachment; filename=\"fosmvvm-swiftui-app-setup-2.0.6.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "fosmvvm-swiftui-app-setup"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/fosmvvm-swiftui-app-setup"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/fosmvvm-swiftui-app-setup",
    "agentPageUrl": "https://openagent3.xyz/skills/fosmvvm-swiftui-app-setup/agent",
    "manifestUrl": "https://openagent3.xyz/skills/fosmvvm-swiftui-app-setup/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/fosmvvm-swiftui-app-setup/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "FOSMVVM SwiftUI App Setup",
        "body": "Generate the main App struct for a SwiftUI application using FOSMVVM architecture."
      },
      {
        "title": "Conceptual Foundation",
        "body": "For full architecture context, see FOSMVVMArchitecture.md | OpenClaw reference\n\nThe App struct is the entry point of a SwiftUI application. In FOSMVVM, it has three core responsibilities:\n\n┌─────────────────────────────────────────────────────────────┐\n│                      @main App Struct                        │\n├─────────────────────────────────────────────────────────────┤\n│  1. MVVMEnvironment Setup                                   │\n│     - Bundles (app + localization resources)                │\n│     - Deployment URLs (production, staging, debug)          │\n│                                                              │\n│  2. Environment Injection                                   │\n│     - .environment(mvvmEnv) on WindowGroup                  │\n│     - Custom environment values                             │\n│                                                              │\n│  3. Test Infrastructure (DEBUG only)                        │\n│     - .testHost { } modifier for UI testing                 │\n│     - registerTestingViews() for individual view testing    │\n└─────────────────────────────────────────────────────────────┘"
      },
      {
        "title": "1. MVVMEnvironment",
        "body": "The MVVMEnvironment provides FOSMVVM infrastructure to all views:\n\nprivate var mvvmEnv: MVVMEnvironment {\n    MVVMEnvironment(\n        appBundle: Bundle.main,\n        resourceBundles: [\n            MyAppViewModelsResourceAccess.localizationBundle,\n            SharedResourceAccess.localizationBundle\n        ],\n        deploymentURLs: [\n            .production: .init(serverBaseURL: URL(string: \"https://api.example.com\")!),\n            .debug: .init(serverBaseURL: URL(string: \"http://localhost:8080\")!)\n        ]\n    )\n}\n\nKey configuration:\n\nappBundle - Usually Bundle.main (the app bundle)\nresourceBundles - Array of localization bundles from your modules\ndeploymentURLs - URLs for each deployment environment\n\nResource Bundle Accessors:\n\nEach module that contains localization resources should provide a bundle accessor:\n\n// In your ViewModels module (e.g., MyAppViewModels/ResourceAccess.swift)\npublic enum MyAppViewModelsResourceAccess {\n    public static var localizationBundle: Bundle { Bundle.module }\n}\n\nThis pattern:\n\nUses Bundle.module which SPM automatically provides for each module\nProvides a clean public API for accessing the module's resources\nKeeps bundle access centralized in one place per module"
      },
      {
        "title": "2. Environment Injection",
        "body": "The MVVMEnvironment is injected at the WindowGroup level:\n\nvar body: some Scene {\n    WindowGroup {\n        MyView()\n    }\n    .environment(mvvmEnv)  // ← Makes FOSMVVM infrastructure available\n}\n\nThis makes the environment available to all views in the hierarchy."
      },
      {
        "title": "3. Test Infrastructure",
        "body": "The test infrastructure enables UI testing with specific configurations:\n\n.testHost { } modifier:\n\nvar body: some Scene {\n    WindowGroup {\n        ZStack {\n            LandingPageView()\n        }\n        #if DEBUG\n        .testHost { testConfiguration, testView in\n            // Handle specific test configurations...\n\n            default:\n                testView\n                    .onAppear {\n                        underTest = ProcessInfo.processInfo.arguments.count > 1\n                    }\n        }\n        #endif\n    }\n}\n\nKey points:\n\nApply to the top-level view in WindowGroup (the outermost view in your hierarchy)\nThis ensures the modifier wraps the entire view hierarchy to intercept test configurations\nAlways include the default: case\nThe default case detects test mode via process arguments\nSets @State private var underTest = false flag\nOptional: Add specific test configurations for advanced scenarios\n\nregisterTestingViews() function:\n\n#if DEBUG\nprivate extension MyApp {\n    @MainActor func registerTestingViews() {\n        mvvmEnv.registerTestView(LandingPageView.self)\n        mvvmEnv.registerTestView(SettingsView.self)\n        // ... register all ViewModelViews for individual testing\n    }\n}\n#endif\n\nKey points:\n\nExtension on the App struct (not MVVMEnvironment)\nCalled from init()\nRegisters every ViewModelView for isolated testing\nDEBUG only"
      },
      {
        "title": "When to Use This Skill",
        "body": "Starting a new FOSMVVM SwiftUI application\nMigrating an existing SwiftUI app to FOSMVVM\nSetting up the App struct with proper FOSMVVM infrastructure\nConfiguring test infrastructure for UI testing"
      },
      {
        "title": "What This Skill Generates",
        "body": "ComponentLocationPurposeMain App structSources/App/{AppName}.swiftEntry point with MVVMEnvironment setupMVVMEnvironment configurationComputed property in App structBundles and deployment URLsTest infrastructureDEBUG blocks in App structUI testing support"
      },
      {
        "title": "Project Structure Configuration",
        "body": "PlaceholderDescriptionExample{AppName}Your app nameMyApp, AccelApp{AppTarget}Main app targetApp{ResourceBundles}Module names with localizationMyAppViewModels, SharedResources"
      },
      {
        "title": "How to Use This Skill",
        "body": "Invocation:\n/fosmvvm-swiftui-app-setup\n\nPrerequisites:\n\nApp name understood from conversation context\nDeployment URLs discussed or documented\nResource bundles identified (modules with localization)\nTest support requirements clarified\n\nWorkflow integration:\nThis skill is used when setting up a new FOSMVVM SwiftUI application or adding FOSMVVM infrastructure to an existing app. The skill references conversation context automatically—no file paths or Q&A needed."
      },
      {
        "title": "Pattern Implementation",
        "body": "This skill references conversation context to determine App struct configuration:"
      },
      {
        "title": "Configuration Detection",
        "body": "From conversation context, the skill identifies:\n\nApp name (from project discussion or existing code)\nDeployment environments (production, staging, debug URLs)\nResource bundles (modules containing localization YAML files)\nTest infrastructure (whether UI testing support needed)"
      },
      {
        "title": "MVVMEnvironment Setup",
        "body": "Based on project structure:\n\nApp bundle (typically Bundle.main)\nResource bundle accessors (from identified modules)\nDeployment URLs (for each environment)\nCurrent version (from shared module)"
      },
      {
        "title": "Test Infrastructure Planning",
        "body": "If test support needed:\n\nTest detection (process arguments check)\nTest host modifier (wrapping top-level view)\nView registration (all ViewModelViews for testing)"
      },
      {
        "title": "File Generation",
        "body": "Main App struct with @main attribute\nMVVMEnvironment computed property\nWindowGroup with environment injection\nTest infrastructure (if requested, DEBUG-only)\nregisterTestingViews() extension (if test support)"
      },
      {
        "title": "Context Sources",
        "body": "Skill references information from:\n\nPrior conversation: App requirements, deployment environments discussed\nProject structure: From codebase analysis of module organization\nExisting patterns: From other FOSMVVM apps if context available"
      },
      {
        "title": "MVVMEnvironment as Computed Property",
        "body": "The MVVMEnvironment is a computed property, not a stored property:\n\nprivate var mvvmEnv: MVVMEnvironment {\n    MVVMEnvironment(\n        appBundle: Bundle.main,\n        resourceBundles: [...],\n        deploymentURLs: [...]\n    )\n}\n\nWhy computed?\n\nKeeps initialization logic separate\nCan be customized in DEBUG vs RELEASE\nClear dependency on bundles and URLs"
      },
      {
        "title": "Test Detection Pattern",
        "body": "The default test detection uses process arguments:\n\n@State private var underTest = false\n\n// In .testHost default case:\ntestView\n    .onAppear {\n        // Right now there's no other way to detect if the app is under test.\n        // This is only debug code, so we can proceed for now.\n        underTest = ProcessInfo.processInfo.arguments.count > 1\n    }\n\nWhy this approach?\n\nSimple and reliable for DEBUG builds\nNo additional dependencies\nProcess arguments are set by test runner"
      },
      {
        "title": "Register All ViewModelViews",
        "body": "Every ViewModelView should be registered for testing:\n\n@MainActor func registerTestingViews() {\n    // Landing Page\n    mvvmEnv.registerTestView(LandingPageView.self)\n\n    // Settings\n    mvvmEnv.registerTestView(SettingsView.self)\n    mvvmEnv.registerTestView(ProfileView.self)\n\n    // Dashboard\n    mvvmEnv.registerTestView(DashboardView.self)\n    mvvmEnv.registerTestView(CardView.self)\n}\n\nOrganization tips:\n\nGroup by feature/screen with comments\nAlphabetical order within groups\nOne view per line for easy scanning"
      },
      {
        "title": "Multiple Environment Values",
        "body": "You can inject multiple environment values:\n\nvar body: some Scene {\n    WindowGroup {\n        MyView()\n    }\n    .environment(mvvmEnv)\n    .environment(appState)\n    .environment(\\.colorScheme, .dark)\n    .environment(\\.customValue, myCustomValue)\n}"
      },
      {
        "title": "Conditional Test Registration",
        "body": "You can conditionally register views based on build configuration:\n\n#if DEBUG\n@MainActor func registerTestingViews() {\n    mvvmEnv.registerTestView(LandingPageView.self)\n\n    #if INCLUDE_ADMIN_FEATURES\n    mvvmEnv.registerTestView(AdminPanelView.self)\n    #endif\n}\n#endif"
      },
      {
        "title": "Advanced Test Configurations",
        "body": "You can add specific test configurations in .testHost:\n\n.testHost { testConfiguration, testView in\n    switch try? testConfiguration.fromJSON() as MyTestConfiguration {\n    case .specificScenario(let data):\n        testView.environment(MyState.stub(data: data))\n            .onAppear { underTest = true }\n\n    default:\n        testView\n            .onAppear {\n                underTest = ProcessInfo.processInfo.arguments.count > 1\n            }\n    }\n}"
      },
      {
        "title": "File Templates",
        "body": "See reference.md for complete file templates."
      },
      {
        "title": "Naming Conventions",
        "body": "ConceptConventionExampleApp struct{Name}AppMyApp, AccelAppMain file{Name}App.swiftMyApp.swiftMVVMEnvironment propertymvvmEnvAlways mvvmEnvTest flagunderTestAlways underTest"
      },
      {
        "title": "Deployment Configuration",
        "body": "FOSMVVM supports deployment detection via Info.plist:\n\nCI Pipeline Sets:\n   FOS_DEPLOYMENT build setting (e.g., \"staging\" or \"production\")\n        ↓\nInfo.plist Contains:\n   FOS-DEPLOYMENT = $(FOS_DEPLOYMENT)\n        ↓\nRuntime Detection:\n   FOSMVVM.Deployment.current reads from Bundle.main.infoDictionary\n\nLocal development override:\n\nEdit Scheme → Run → Arguments → Environment Variables\nAdd: FOS-DEPLOYMENT = staging"
      },
      {
        "title": "See Also",
        "body": "Architecture Patterns - Mental models and patterns\nFOSMVVMArchitecture.md - Full FOSMVVM architecture\nfosmvvm-viewmodel-generator - For creating ViewModels\nreference.md - Complete file templates"
      },
      {
        "title": "Version History",
        "body": "VersionDateChanges1.02026-01-23Initial skill for SwiftUI app setup1.12026-01-24Update to context-aware approach (remove file-parsing/Q&A). Skill references conversation context instead of asking questions or accepting file paths."
      }
    ],
    "body": "FOSMVVM SwiftUI App Setup\n\nGenerate the main App struct for a SwiftUI application using FOSMVVM architecture.\n\nConceptual Foundation\n\nFor full architecture context, see FOSMVVMArchitecture.md | OpenClaw reference\n\nThe App struct is the entry point of a SwiftUI application. In FOSMVVM, it has three core responsibilities:\n\n┌─────────────────────────────────────────────────────────────┐\n│                      @main App Struct                        │\n├─────────────────────────────────────────────────────────────┤\n│  1. MVVMEnvironment Setup                                   │\n│     - Bundles (app + localization resources)                │\n│     - Deployment URLs (production, staging, debug)          │\n│                                                              │\n│  2. Environment Injection                                   │\n│     - .environment(mvvmEnv) on WindowGroup                  │\n│     - Custom environment values                             │\n│                                                              │\n│  3. Test Infrastructure (DEBUG only)                        │\n│     - .testHost { } modifier for UI testing                 │\n│     - registerTestingViews() for individual view testing    │\n└─────────────────────────────────────────────────────────────┘\n\nCore Components\n1. MVVMEnvironment\n\nThe MVVMEnvironment provides FOSMVVM infrastructure to all views:\n\nprivate var mvvmEnv: MVVMEnvironment {\n    MVVMEnvironment(\n        appBundle: Bundle.main,\n        resourceBundles: [\n            MyAppViewModelsResourceAccess.localizationBundle,\n            SharedResourceAccess.localizationBundle\n        ],\n        deploymentURLs: [\n            .production: .init(serverBaseURL: URL(string: \"https://api.example.com\")!),\n            .debug: .init(serverBaseURL: URL(string: \"http://localhost:8080\")!)\n        ]\n    )\n}\n\n\nKey configuration:\n\nappBundle - Usually Bundle.main (the app bundle)\nresourceBundles - Array of localization bundles from your modules\ndeploymentURLs - URLs for each deployment environment\n\nResource Bundle Accessors:\n\nEach module that contains localization resources should provide a bundle accessor:\n\n// In your ViewModels module (e.g., MyAppViewModels/ResourceAccess.swift)\npublic enum MyAppViewModelsResourceAccess {\n    public static var localizationBundle: Bundle { Bundle.module }\n}\n\n\nThis pattern:\n\nUses Bundle.module which SPM automatically provides for each module\nProvides a clean public API for accessing the module's resources\nKeeps bundle access centralized in one place per module\n2. Environment Injection\n\nThe MVVMEnvironment is injected at the WindowGroup level:\n\nvar body: some Scene {\n    WindowGroup {\n        MyView()\n    }\n    .environment(mvvmEnv)  // ← Makes FOSMVVM infrastructure available\n}\n\n\nThis makes the environment available to all views in the hierarchy.\n\n3. Test Infrastructure\n\nThe test infrastructure enables UI testing with specific configurations:\n\n.testHost { } modifier:\n\nvar body: some Scene {\n    WindowGroup {\n        ZStack {\n            LandingPageView()\n        }\n        #if DEBUG\n        .testHost { testConfiguration, testView in\n            // Handle specific test configurations...\n\n            default:\n                testView\n                    .onAppear {\n                        underTest = ProcessInfo.processInfo.arguments.count > 1\n                    }\n        }\n        #endif\n    }\n}\n\n\nKey points:\n\nApply to the top-level view in WindowGroup (the outermost view in your hierarchy)\nThis ensures the modifier wraps the entire view hierarchy to intercept test configurations\nAlways include the default: case\nThe default case detects test mode via process arguments\nSets @State private var underTest = false flag\nOptional: Add specific test configurations for advanced scenarios\n\nregisterTestingViews() function:\n\n#if DEBUG\nprivate extension MyApp {\n    @MainActor func registerTestingViews() {\n        mvvmEnv.registerTestView(LandingPageView.self)\n        mvvmEnv.registerTestView(SettingsView.self)\n        // ... register all ViewModelViews for individual testing\n    }\n}\n#endif\n\n\nKey points:\n\nExtension on the App struct (not MVVMEnvironment)\nCalled from init()\nRegisters every ViewModelView for isolated testing\nDEBUG only\nWhen to Use This Skill\nStarting a new FOSMVVM SwiftUI application\nMigrating an existing SwiftUI app to FOSMVVM\nSetting up the App struct with proper FOSMVVM infrastructure\nConfiguring test infrastructure for UI testing\nWhat This Skill Generates\nComponent\tLocation\tPurpose\nMain App struct\tSources/App/{AppName}.swift\tEntry point with MVVMEnvironment setup\nMVVMEnvironment configuration\tComputed property in App struct\tBundles and deployment URLs\nTest infrastructure\tDEBUG blocks in App struct\tUI testing support\nProject Structure Configuration\nPlaceholder\tDescription\tExample\n{AppName}\tYour app name\tMyApp, AccelApp\n{AppTarget}\tMain app target\tApp\n{ResourceBundles}\tModule names with localization\tMyAppViewModels, SharedResources\nHow to Use This Skill\n\nInvocation: /fosmvvm-swiftui-app-setup\n\nPrerequisites:\n\nApp name understood from conversation context\nDeployment URLs discussed or documented\nResource bundles identified (modules with localization)\nTest support requirements clarified\n\nWorkflow integration: This skill is used when setting up a new FOSMVVM SwiftUI application or adding FOSMVVM infrastructure to an existing app. The skill references conversation context automatically—no file paths or Q&A needed.\n\nPattern Implementation\n\nThis skill references conversation context to determine App struct configuration:\n\nConfiguration Detection\n\nFrom conversation context, the skill identifies:\n\nApp name (from project discussion or existing code)\nDeployment environments (production, staging, debug URLs)\nResource bundles (modules containing localization YAML files)\nTest infrastructure (whether UI testing support needed)\nMVVMEnvironment Setup\n\nBased on project structure:\n\nApp bundle (typically Bundle.main)\nResource bundle accessors (from identified modules)\nDeployment URLs (for each environment)\nCurrent version (from shared module)\nTest Infrastructure Planning\n\nIf test support needed:\n\nTest detection (process arguments check)\nTest host modifier (wrapping top-level view)\nView registration (all ViewModelViews for testing)\nFile Generation\nMain App struct with @main attribute\nMVVMEnvironment computed property\nWindowGroup with environment injection\nTest infrastructure (if requested, DEBUG-only)\nregisterTestingViews() extension (if test support)\nContext Sources\n\nSkill references information from:\n\nPrior conversation: App requirements, deployment environments discussed\nProject structure: From codebase analysis of module organization\nExisting patterns: From other FOSMVVM apps if context available\nKey Patterns\nMVVMEnvironment as Computed Property\n\nThe MVVMEnvironment is a computed property, not a stored property:\n\nprivate var mvvmEnv: MVVMEnvironment {\n    MVVMEnvironment(\n        appBundle: Bundle.main,\n        resourceBundles: [...],\n        deploymentURLs: [...]\n    )\n}\n\n\nWhy computed?\n\nKeeps initialization logic separate\nCan be customized in DEBUG vs RELEASE\nClear dependency on bundles and URLs\nTest Detection Pattern\n\nThe default test detection uses process arguments:\n\n@State private var underTest = false\n\n// In .testHost default case:\ntestView\n    .onAppear {\n        // Right now there's no other way to detect if the app is under test.\n        // This is only debug code, so we can proceed for now.\n        underTest = ProcessInfo.processInfo.arguments.count > 1\n    }\n\n\nWhy this approach?\n\nSimple and reliable for DEBUG builds\nNo additional dependencies\nProcess arguments are set by test runner\nRegister All ViewModelViews\n\nEvery ViewModelView should be registered for testing:\n\n@MainActor func registerTestingViews() {\n    // Landing Page\n    mvvmEnv.registerTestView(LandingPageView.self)\n\n    // Settings\n    mvvmEnv.registerTestView(SettingsView.self)\n    mvvmEnv.registerTestView(ProfileView.self)\n\n    // Dashboard\n    mvvmEnv.registerTestView(DashboardView.self)\n    mvvmEnv.registerTestView(CardView.self)\n}\n\n\nOrganization tips:\n\nGroup by feature/screen with comments\nAlphabetical order within groups\nOne view per line for easy scanning\nCommon Customizations\nMultiple Environment Values\n\nYou can inject multiple environment values:\n\nvar body: some Scene {\n    WindowGroup {\n        MyView()\n    }\n    .environment(mvvmEnv)\n    .environment(appState)\n    .environment(\\.colorScheme, .dark)\n    .environment(\\.customValue, myCustomValue)\n}\n\nConditional Test Registration\n\nYou can conditionally register views based on build configuration:\n\n#if DEBUG\n@MainActor func registerTestingViews() {\n    mvvmEnv.registerTestView(LandingPageView.self)\n\n    #if INCLUDE_ADMIN_FEATURES\n    mvvmEnv.registerTestView(AdminPanelView.self)\n    #endif\n}\n#endif\n\nAdvanced Test Configurations\n\nYou can add specific test configurations in .testHost:\n\n.testHost { testConfiguration, testView in\n    switch try? testConfiguration.fromJSON() as MyTestConfiguration {\n    case .specificScenario(let data):\n        testView.environment(MyState.stub(data: data))\n            .onAppear { underTest = true }\n\n    default:\n        testView\n            .onAppear {\n                underTest = ProcessInfo.processInfo.arguments.count > 1\n            }\n    }\n}\n\nFile Templates\n\nSee reference.md for complete file templates.\n\nNaming Conventions\nConcept\tConvention\tExample\nApp struct\t{Name}App\tMyApp, AccelApp\nMain file\t{Name}App.swift\tMyApp.swift\nMVVMEnvironment property\tmvvmEnv\tAlways mvvmEnv\nTest flag\tunderTest\tAlways underTest\nDeployment Configuration\n\nFOSMVVM supports deployment detection via Info.plist:\n\nCI Pipeline Sets:\n   FOS_DEPLOYMENT build setting (e.g., \"staging\" or \"production\")\n        ↓\nInfo.plist Contains:\n   FOS-DEPLOYMENT = $(FOS_DEPLOYMENT)\n        ↓\nRuntime Detection:\n   FOSMVVM.Deployment.current reads from Bundle.main.infoDictionary\n\n\nLocal development override:\n\nEdit Scheme → Run → Arguments → Environment Variables\nAdd: FOS-DEPLOYMENT = staging\nSee Also\nArchitecture Patterns - Mental models and patterns\nFOSMVVMArchitecture.md - Full FOSMVVM architecture\nfosmvvm-viewmodel-generator - For creating ViewModels\nreference.md - Complete file templates\nVersion History\nVersion\tDate\tChanges\n1.0\t2026-01-23\tInitial skill for SwiftUI app setup\n1.1\t2026-01-24\tUpdate to context-aware approach (remove file-parsing/Q&A). Skill references conversation context instead of asking questions or accepting file paths."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/foscomputerservices/fosmvvm-swiftui-app-setup",
    "publisherUrl": "https://clawhub.ai/foscomputerservices/fosmvvm-swiftui-app-setup",
    "owner": "foscomputerservices",
    "version": "2.0.6",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/fosmvvm-swiftui-app-setup",
    "downloadUrl": "https://openagent3.xyz/downloads/fosmvvm-swiftui-app-setup",
    "agentUrl": "https://openagent3.xyz/skills/fosmvvm-swiftui-app-setup/agent",
    "manifestUrl": "https://openagent3.xyz/skills/fosmvvm-swiftui-app-setup/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/fosmvvm-swiftui-app-setup/agent.md"
  }
}