pkg:clod/com.clodhub/apple-host 0.13.0 One SwiftUI application for iPhone, iPad, Mac (Catalyst) and Apple TV: shared window and platform differences in Swift, and the XcodeGen project, Info.plist and export options rendered from typed settings. One SwiftUI application for iPhone, iPad, Mac (Catalyst) and Apple TV, with the platform differences handled once. The Swift side supplies the shared window (`ApplicationShell`), a table of what each device family does differently (`PlatformTraits`), view modifiers for the calls that differ between platforms, and the settings the project writes into Info.plist. The build side renders the XcodeGen `project.yml`, the iPhone/iPad/Mac and Apple TV Info.plist files, the Mac sandbox entitlements, App Store export options and the Apple TV icon catalogue skeleton from typed settings. Examples iPhone and iPad share one target and run portrait or all orientations; Mac runs the same target as Mac Catalyst with the sandbox entitlements and an upright board; Apple TV is a second target with focus navigation, the remote Menu button as exit command and no corner help control. Package URL: pkg:clod/com.clodhub/apple-host@0.13.0 Class: Apple host (pkg:clod/com.clodhub/apple-host-class@1.1.0): An Xcode project for iPhone, iPad, Mac and Apple TV rendered from the application's files. Any component of this class can fill a recipe slot that asks for it. Category devices-and-hosts/mobile; https://clodhub.com/classes/apple-host-class.txt; 0 other components of this class: https://clodhub.com/components.txt?class=pkg%3Aclod%2Fcom.clodhub%2Fapple-host-class Provides (1) - apple-shell (com.clodhub/apple-shell 1.0.0): Apple application shell for iPhone, iPad, Mac (Catalyst) and Apple TV. Methods tagged typescript are exported functions of apple/render.ts run at build time under Node; methods tagged swift are public Swift API in apple/Sources compiled into the application. components that use it: https://clodhub.com/components.txt?requires=com.clodhub%2Fapple-shell Requires (1) - theme (com.clodhub/theme 1.0.0): Design tokens for colours, spacing, radii, type scale and an animated background, rendered to CSS variables, Swift constants and Kotlin constants. Web: implementation/web/tokens.ts and background.ts. Apple: ThemeTypes.swift, ThemeTokens.swift, BackgroundMath.swift, ThemeBackgroundView.swift. Android: package com.clodhub.theme. components that provide it: https://clodhub.com/components.txt?provides=com.clodhub%2Ftheme Settings (5) The installer collects these settings. `bundleIdentifier` (required) is the application's unique identifier on Apple's stores, lower-case words separated by dots, such as `app.ourapps.ourpoker`; the iPhone, iPad, Mac and Apple TV apps all carry it. `displayName` (required) is the name shown under the icon, letters, digits, spaces and hyphens, such as `OurPoker`. `scheme` (required) is the name of the Xcode project and its main target, letters, digits and underscores starting with a letter, such as `OurPoker`; it also names the signing variables (`_TEAM`). `targets` takes the recipe's client target list, space-separated (default `web ios android macos windows tvos`): `ios` builds iPhone and iPad, `macos` builds Mac (Catalyst), `tvos` builds Apple TV, and `web`, `android` and `windows` are ignored. A list with no Apple target writes no Apple project; `renderApple` returns an empty `files` and a message saying so. A word that is neither an Apple nor a recipe target (for example `watch`) is refused. `deploymentTargets` is a space-separated list such as `ios17 tvos17 macos14` (major version; `ios17_2` for a minor version); the collected grammar cannot carry dots. - bundleIdentifier: string (qualified); required, no default - displayName: string (label); required, no default - targets: string (label); optional, default "web ios android macos windows tvos" - deploymentTargets: string (label); optional, default "ios17 tvos17 macos14" - scheme: string (identifier); required, no default Depends on components: none How to use in a recipe A recipe uses it through a slot of class Apple host (pkg:clod/com.clodhub/apple-host-class 1.1.0), naming pkg:clod/com.clodhub/apple-host as the slot's preferred component or substituting it for another component of the class. The recipe connects what it provides (apple-shell) to the slots that use it. It fills what the component needs (theme) from slots whose components provide it. The recipe sets bundleIdentifier, displayName, targets, deploymentTargets and scheme; bundleIdentifier, displayName and scheme have no default, so the recipe always sets them. - as a slot in recipe.json components: {"id":"apple-host","class":{"name":"pkg:clod/com.clodhub/apple-host-class","version":"1.1.0","digest":"b0640a01993d7d1b40c84ee8ed25245b213bc79e8904c47bd254b7bcf1267490"},"preferred":{"name":"pkg:clod/com.clodhub/apple-host","version":"0.13.0"}} - in place of another component of the class: clod fetch apple-host@0.13.0 --store store --from https://clodhub.com, then clod design RECIPE@VERSION --store store --answers answers.json --substitute SLOT=apple-host@0.13.0 --out definition.json Used by recipes: pkg:clod/com.clodhub/ourpoker-recipe 0.13.0 (slot apple-host) For developers: how an application uses it In an installed application, `settings` is `appleHostSettings` from the rendered `apple/settings.ts`. Render the project with `renderApple(settings, options)` from `apple/render.ts`, which returns `{files, message}`, and write `files` with `writeApple` into the Apple project folder, then run `xcodegen generate`. When `files` is empty the targets named no Apple target and `message` says so. `options.componentSources` lists the `apple/Sources` folders of the other components compiled into the application; `options.packages` lists Swift packages. The application keeps its own sources under `/Sources`, resources under `/Resources` and the Apple TV images in `TV/Assets.xcassets`. In the application's `@main App` return `ApplicationShell(ShellConfiguration(...)) { RootView() }`; ask `Platform.traits` for device differences and use `shellStatusBarHidden`, `shellNameInput`, `shellButtonStyle` and `shellExitCommand` where the API differs. `ShellSettings.current` reads the display name and server address that the generated project writes into Info.plist. `examples/consumer.ts` and `examples/Application.swift` show both halves. Accounts and services No service is deployed. Building needs a Mac with Xcode and XcodeGen; signing and App Store Connect belong to the release pipeline. Team and profile names reach the project through environment variables named after the scheme (`_TEAM`, `_PROFILE`, `_TV_PROFILE`), supplied by reference at release time; no signing material is stored here. Export option files hold the placeholders `TEAM_ID` and `PROFILE_NAME` for the pipeline to replace. How it is checked `node --test tests/render.test.ts` renders the fixture application for every target combination and checks the project, property lists, export options and asset skeleton. `python3 tests/native.py apple` compiles the Swift host sources with swiftc 6.4 against the fixture traits table and settings cases, and type-checks the example entry point. `python3 tests/native.py project` renders the fixture into a project folder, runs XcodeGen 2.46 on it and checks the generated Xcode project and the property lists with plutil. The project was not built with xcodebuild, and nothing ran on a device or simulator. - `node --test tests/render.test.ts` (render, required-local; tools: node 26.5) - `python3 tests/native.py apple` (apple, platform; tools: python3 3.12, swiftc 6.4, xcrun 72) - `python3 tests/native.py project` (project, platform; tools: python3 3.12, node 26.5, xcodegen 2.46) Updates Patch updates replace the owned files; regenerate the project after each update. Removal deletes the owned sources and the generated project folder entries; the application's own sources are untouched. No application data is held. Tags: apple, devices-and-hosts, host, mobile Targets: client ios, macos, tvos; server none Publisher: George McIntyre (george-mcintyre) Guardians: Level N Ltd (guardian key 08775f20) Source: clodhub/apple-host release v0.13.0; digest sha256:2cb3c6717a7d3d2e8c235a9c337036798ce28fef783766019059a373e95cdd13 Release: features Line 0.13: no security releases Quality: Integration-tested, certified Known vulnerabilities: none known (checked 2026-11-26 at OSV); https://clodhub.com/api/components/apple-host/0.13.0/vulnerabilities Downloads: 1 in 30 days; 1 of this version Classes: https://clodhub.com/classes.txt; this component as JSON: https://clodhub.com/api/components/apple-host/0.13.0 Bundle download: GET https://clodhub.com/api/components/apple-host/0.13.0/bundle returns a link valid for one hour Implements: pkg:clod/com.clodhub/apple-host-class@1.1.0 b0640a01993d7d1b40c84ee8ed25245b213bc79e8904c47bd254b7bcf1267490 com.clodhub/apple-shell 1.0.0 entry modules: ios apple/Sources, macos apple/Sources, server server/index.ts, tvos apple/Sources shared behaviour suites: shared Platforms: ios, macos, server, tvos Toolchains: ios >=17.0.0, macos >=14.0.0, node >=26.5.0 <27.0.0, swift =6.4.2, tvos >=17.0.0 Frameworks: none Styles: scope none; 0 namespaces; 0 conflicts Licence: Apache-2.0; 0 upstream sources, 0 exact dependencies, 55 files (listed on the details page) Suitable for jobs: apple-host profile any: cost none; load none; regions any; compliance none Notes: No provider limits are cited because the component deploys nothing. Data migration: this component keeps no data Maintainers: Level N Ltd; https://github.com/clodhub/apple-host/issues; updates https://github.com/clodhub/apple-host/releases (manual) What you download apple-host-0.13.0.tar, from release v0.13.0 of clodhub/apple-host: 55 files - Documents and manifests (8): CONTRACT.md, INSTRUCTIONS.md, LICENCE, NOTICE, PROVENANCE.md, SOURCE.md, ... - Source code (29): apple/ (28), server/ (1) - Tests (6): apple/ (2), fixtures/ (2), native.py, render.test.ts - Interface documents (2): apple-shell.json, required-theme.json - Class files: the class's interfaces and shared checks (3): apple-host-class/ (3) - Examples (2): Application.swift, consumer.ts - Diagrams (5): definition.json, examples/ (1), output/ (3) Installing copies 29 of them into the application under components/apple-host/: apple 28, server 1 Not included: the components that provide what it requires (com.clodhub/theme), each a separate download; the values of its settings, which the recipe writes; any secret The archive is a release file on the publisher's public GitHub repository; ClodHub keeps this page and a pointer to the release, not the code. clod checks the archive's sha256 fingerprint before anything is copied, and installing runs none of the package's code. Versions - 0.13.0 features (2026-11-26T11:24:09.856Z) sha256:2cb3c6717a7d3d2e8c235a9c337036798ce28fef783766019059a373e95cdd13 Links Details (package foundations, upstream sources, exact dependencies, styles, class inventories, files): https://clodhub.com/components/apple-host/details.txt?version=0.13.0 Page: https://clodhub.com/components/apple-host; JSON: https://clodhub.com/api/components/apple-host/0.13.0; connections diagram: https://clodhub.com/api/components/apple-host/0.13.0/connections.svg Copyright Level N Ltd 2026