building-mobile-apps
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSalesforce Mobile
Salesforce 移动应用
Route the user to the right SDK-family skill for building Salesforce-connected mobile apps. Do not implement features here; child skills own scenario detection and step-by-step instructions.
将用户引导至合适的SDK家族技能,以构建连接Salesforce的移动应用。请勿在此处实现功能;子技能负责场景检测和分步指导。
Before routing
路由前准备
Disambiguate on two dimensions: SDK family (Mobile SDK vs. Agentforce SDK) and platform (iOS vs. Android). They are not mutually exclusive — an app can use both SDKs.
If the user's intent could plausibly map to either SDK, ask before routing. Guessing wrong wastes the user's time because the child skills are platform- and SDK-specific.
从两个维度进行区分:SDK家族(Mobile SDK vs. Agentforce SDK)和平台(iOS vs. Android)。它们并非互斥——一个应用可以同时使用这两个SDK。
如果用户的意图可能对应任一SDK,请在路由前询问用户。因为子技能是针对特定平台和SDK的,猜测错误会浪费用户时间。
Routing — which SDK family?
路由——选择哪个SDK家族?
| User's situation | SDK |
|---|---|
| Authenticating end users to Salesforce, syncing records (MobileSync), storing data offline (SmartStore), biometric login, push notifications, REST integration | Mobile SDK |
| Embedding an Agentforce agent — chat UI, agent conversations, conversational features as the primary surface | Agentforce SDK |
| Both (data-driven app with an embedded agent) | Mobile SDK first, then Agentforce SDK layered on top |
| 用户场景 | SDK |
|---|---|
| 终端用户身份验证到Salesforce、记录同步(MobileSync)、离线数据存储(SmartStore)、生物识别登录、推送通知、REST集成 | Mobile SDK |
| 嵌入Agentforce agent——聊天UI、agent对话、以对话功能为核心界面 | Agentforce SDK |
| 两者兼具(带有嵌入式agent的数据驱动型应用) | 先使用Mobile SDK,再叠加Agentforce SDK |
Tiebreakers when both seem to apply
当两种情况都适用时的判断规则
- Is the agent the primary surface (chat-first app), or a feature inside an otherwise data-driven app?
- Primary → Agentforce SDK
- Feature → Mobile SDK; embed the agent via Agentforce SDK alongside it
- Are end users authenticating into Salesforce data?
- Yes → Mobile SDK is required (Agentforce SDK can be added on top).
- No → Agentforce SDK alone is likely sufficient (it uses guest auth).
- Asking about offline storage, sync, REST, push, or biometrics? → Mobile SDK.
- Asking about agent conversations, chat UI, or streaming responses? → Agentforce SDK.
When still unclear, ask the user directly.
- agent是应用的核心界面(聊天优先型应用),还是数据驱动型应用中的一项功能?
- 核心界面 → Agentforce SDK
- 功能模块 → Mobile SDK;同时通过Agentforce SDK嵌入agent
- 终端用户是否需要验证身份以访问Salesforce数据?
- 是 → 需要Mobile SDK(可在此基础上添加Agentforce SDK)
- 否 → 单独使用Agentforce SDK可能足够(它使用访客身份验证)
- 用户询问离线存储、同步、REST、推送或生物识别相关内容?→ Mobile SDK
- 用户询问agent对话、聊天UI或流式响应相关内容?→ Agentforce SDK
若仍不明确,请直接询问用户。
Routing — which platform?
路由——选择哪个平台?
| Platform | Mobile SDK skill | Agentforce SDK skill |
|---|---|---|
| iOS (Swift) | | |
| Android (Kotlin) | | |
If the user wants both platforms, route to each child skill separately — they are independent.
| 平台 | Mobile SDK技能 | Agentforce SDK技能 |
|---|---|---|
| iOS(Swift) | | |
| Android(Kotlin) | | |
如果用户需要同时支持两个平台,请分别引导至对应的子技能——它们是相互独立的。
Combined workflows (Mobile SDK + Agentforce SDK)
组合工作流(Mobile SDK + Agentforce SDK)
When an app needs both:
- Route to the Mobile SDK platform skill first to scaffold and authenticate.
- Route to the Agentforce SDK platform skill to layer the agent surface.
- Treat each child skill's instructions as authoritative for its SDK; do not merge their steps. Each SDK owns its own auth setup, dependency installation order, and initialization sequence — interleaving them produces conflicting config and broken init order.
This sequencing is the only multi-skill logic this skill owns. Everything else lives inside the child skills.
当应用需要同时使用两个SDK时:
- 先引导至对应平台的Mobile SDK技能,进行框架搭建和身份验证。
- 再引导至对应平台的Agentforce SDK技能,添加agent界面。
- 将每个子技能的说明视为对应SDK的权威指导;请勿合并它们的步骤。每个SDK都有自己的身份验证设置、依赖安装顺序和初始化流程——交错执行会导致配置冲突和初始化顺序错误。
这种执行顺序是本技能唯一拥有的多技能逻辑。其余所有内容都由子技能负责。
Loading a child skill
加载子技能
Invoke the child skill by name through the harness. If it is not available locally, prompt the user to install it with . If the user confirms (or has pre-authorized installs), run the command and load the child skill — do not make the user go figure out how to continue the workflow. If the user declines, stop and explain that the child skill owns the SDK's setup steps and the workflow cannot continue without it. Each child skill is published from a public repo:
npx skills add <repo>| Skill | Repo | Install command |
|---|---|---|
| | |
| | |
| | |
| | |
After install, load the child skill and let it take over. Do not inline the child skill's content — the child skill owns scenario detection, prerequisites, and step-by-step instructions.
通过组件调用子技能的名称。如果该子技能未在本地可用,请提示用户使用命令安装。如果用户确认(或已预先授权安装),则运行该命令并加载子技能——不要让用户自行摸索如何继续工作流。如果用户拒绝,则停止操作并说明子技能负责SDK的设置步骤,没有它工作流无法继续。每个子技能都从公开仓库发布:
npx skills add <repo>| 技能 | 仓库 | 安装命令 |
|---|---|---|
| | |
| | |
| | |
| | |
安装完成后,加载子技能并交由其处理。请勿将子技能的内容内联显示——子技能负责场景检测、前置条件和分步指导。