shipswift

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

ShipSwift Recipes

ShipSwift 食谱

Production-ready SwiftUI implementations you can copy into iOS/macOS apps. Each recipe is a self-contained markdown doc with an architecture overview, full source code, an integration checklist, and known pitfalls.
可直接复制到iOS/macOS应用中的生产级SwiftUI实现。每个食谱都是独立的Markdown文档,包含架构概述、完整源代码、集成清单和已知陷阱。

How to use

使用方法

  1. Find a recipe: read references/index.md — the full catalog (89 recipes across animation / chart / component / module) with one-line descriptions.
  2. Read the recipe: free recipes are bundled locally at
    references/<category>/<id>.md
    . Always read the full recipe file before writing code — do not improvise from the index line alone.
  3. Integrate: follow the recipe's integration checklist. Keep the
    SW
    type prefix and
    .sw
    view-modifier naming conventions unless the user asks otherwise.
Guidelines:
  • Recipes are self-contained: components depend only on small SWUtil helpers, which each recipe inlines or references explicitly.
  • When combining recipes (e.g. an onboarding flow from onboarding-view + typewriter-text + confetti), read each recipe fully first, then integrate them together.
  • Present catalog browsing results as scannable tables grouped by category, and include recipe IDs so the user can reference them later.
  1. 查找食谱:阅读references/index.md — 完整目录(涵盖动画/图表/组件/模块的89个食谱),每个食谱配有一行描述。
  2. 阅读食谱:免费食谱本地存放在
    references/<category>/<id>.md
    路径下。编写代码前务必完整阅读食谱文件 — 不要仅根据目录的一行描述自行发挥。
  3. 集成:遵循食谱中的集成清单。除非用户另有要求,否则请保留
    SW
    类型前缀和
    .sw
    视图修饰符的命名规范。
指南:
  • 食谱独立封装:组件仅依赖小型SWUtil工具类,每个食谱都会内联或明确引用这些工具类。
  • 组合食谱时(例如,将引导页视图+打字机文本+彩屑效果组合成引导流程),请先完整阅读每个食谱,再进行集成。
  • 以可快速浏览的表格形式按类别展示目录浏览结果,并包含食谱ID,方便用户后续参考。

Latest source on GitHub

GitHub上的最新源码

The bundled references match the latest ShipSwift release. For the newest source, or for shared utilities not inlined in a recipe, fetch from the public template repo:
  • Repo: https://github.com/signerlabs/ShipSwift
  • Component paths:
    ShipSwift/SWPackage/{SWAnimation,SWChart,SWComponent,SWModule,SWUtil}/
  • Raw file example:
    https://raw.githubusercontent.com/signerlabs/ShipSwift/main/ShipSwift/SWPackage/SWAnimation/SWShimmer.swift
本地打包的参考文档与ShipSwift最新版本一致。如需获取最新源码或食谱中未内联的共享工具类,请从公开模板仓库获取:
  • 仓库地址:https://github.com/signerlabs/ShipSwift
  • 组件路径:
    ShipSwift/SWPackage/{SWAnimation,SWChart,SWComponent,SWModule,SWUtil}/
  • 原始文件示例:
    https://raw.githubusercontent.com/signerlabs/ShipSwift/main/ShipSwift/SWPackage/SWAnimation/SWShimmer.swift

Pro recipes

Pro版食谱

5 recipes are Pro tier, marked Pro in the index:
subscription-storekit
,
subscription-revenuecat
,
tiktok-tracking
,
subject-lifting
,
export-share
. Their full docs (architecture, integration checklist, pitfalls) are delivered through the ShipSwift MCP server and are not bundled here.
To unlock Pro:
  1. Purchase ShipSwift Pro ($89 one-time, lifetime) at https://shipswift.app/pricing to get an API key.
  2. Set the key and connect the MCP server (Claude Code example; other tools: see the repo README):
    bash
    export SHIPSWIFT_API_KEY=sk_live_xxxxx   # add to ~/.zshrc
    claude mcp add --transport http shipswift https://api.shipswift.app/mcp \
      --header "Authorization: Bearer ${SHIPSWIFT_API_KEY}"
  3. Fetch Pro recipes with the MCP tools
    listRecipes
    /
    searchRecipes
    /
    getRecipe
    .
If the user asks for a Pro recipe and no key/MCP is configured, tell them what the recipe covers (from the index) and point them to https://shipswift.app/pricing. Do not attempt to reconstruct Pro recipe content from memory.
有5个食谱属于Pro层级,在目录中标记为Pro
subscription-storekit
subscription-revenuecat
tiktok-tracking
subject-lifting
export-share
。它们的完整文档(架构、集成清单、陷阱)通过ShipSwift MCP服务器提供,未包含在本地打包文件中。
解锁Pro版:
  1. 前往https://shipswift.app/pricing购买ShipSwift Pro(一次性支付89美元,终身使用)以获取API密钥。
  2. 设置密钥并连接MCP服务器(以下为Claude Code示例;其他工具请查看仓库README):
    bash
    export SHIPSWIFT_API_KEY=sk_live_xxxxx   # 添加到~/.zshrc
    claude mcp add --transport http shipswift https://api.shipswift.app/mcp \
      --header "Authorization: Bearer ${SHIPSWIFT_API_KEY}"
  3. 使用MCP工具
    listRecipes
    /
    searchRecipes
    /
    getRecipe
    获取Pro版食谱。
如果用户请求Pro版食谱但未配置密钥/MCP,请告知该食谱涵盖的内容(来自目录)并引导他们访问https://shipswift.app/pricing。请勿尝试凭记忆重构Pro版食谱内容。

Recipe combinations that work well

推荐的食谱组合

  • Onboarding flow: onboarding-view + typewriter-text + confetti
  • Analytics dashboard: line-chart + bar-chart + donut-chart + activity-heatmap
  • AI chat app: chat + thinking-indicator + markdown-text
  • Social / media feature: camera + chat + auth-cognito
  • Monetization: subscription-storekit (Pro) + order-view
  • 引导流程:引导页视图 + 打字机文本 + 彩屑效果
  • 分析仪表盘:折线图 + 柱状图 + 环形图 + 活动热力图
  • AI聊天应用:聊天组件 + 思考指示器 + Markdown文本
  • 社交/媒体功能:相机 + 聊天 + Cognito认证
  • 变现模块:StoreKit订阅(Pro版) + 订单视图