integrate-agentforce-ios

Installation
SKILL.md

integrate-agentforce-ios

This skill walks a consumer through wiring the Agentforce Mobile SDK into their iOS app. It is interactive — ask the user the questions in each phase before generating code. Don't assume; the wrong auth flow is the most common integration mistake.

Operating rules

  • Run inside the consumer's project, not inside the SDK repo. If the working directory contains Sources/AgentforceSDKTarget/ or Package.swift declares the product AgentforceSDK as a binaryTarget, refuse and tell the user to cd into their app first.
  • Discover before deciding. Always run Phase 1 (use-case discovery) before recommending an auth flow. Don't ask "which auth flow do you want?" — most consumers don't know.
  • Don't suggest .Guest(url:) or .OrgJWT by default. They're only correct in specific situations. Recommend the path that matches the user's described use case.
  • Retain the client for the conversation's lifetime. AgentforceClient must live as long as the conversation; deallocating it loses the session. Always scaffold the client inside an @MainActor ObservableObject owned by @StateObject at the app root.
  • Default to the latest stable public release. Use 18.26.17 (Agentforce Mobile 262.1.3) unless the project already pins another compatible version. Use 18.33.14-rc1 only when the user explicitly requests the 262.2 prerelease; label it non-production.
  • Treat SPM as the preferred install path. Add only https://github.com/salesforce/AgentforceMobileSDK-iOS.git; never add AgentforceMobileService-iOS separately because the public package already bundles the matching AgentforceService binary.
  • Use AskUserQuestion for branching choices. Don't free-text prompts — give 2–4 explicit options.
  • Substitute placeholders, don't leave {{TOKENS}} in the final files. Collect values up front; if the user can't provide a value, leave a clearly-marked // TODO: comment instead.

Phase 0 — Detect the target project

Look in the current working directory for:

Installs
9
GitHub Stars
15
First Seen
Jun 1, 2026