AppleHIG活动视图

AyushRajSinghParihar2026-10-27查看 413复制 1824

在设计、审查或调整系统共享、自定义活动以及共享或操作扩展时使用。

Download (.md)

📘如何使用这个技能

  1. 1
    复制技能内容·点击上方「Copy SKILL.md」复制全部内容,或 Download 下载到本地
  2. 2
    打开你的 AI 客户端·支持 Claude Code、Trae、Cursor、ChatGPT、DeepSeek、Kimi 等任意 AI 助手
  3. 3
    粘贴为系统提示/知识文件·Claude Code:放入 .claude/skills/ 目录;普通对话:作为首条消息发送并说「请严格按这份技能文档执行」
  4. 4
    直接提出你的需求·AI 会按技能定义的工作流、格式和约束来处理,无需再解释背景

💡 提示:技能生效后,每次对话只需一句需求,AI 会按 SKILL.md 的流程执行。

SKILL.md2572 chars
---
name: apple-hig-activity-views
description: Use when designing, reviewing, or adapting system sharing, custom activities, and share or action extensions.
---

# Share the current content through its context

Read [the activity-view guide](../../references/activity-views.md). The procedure is application advice; distinguish activity views from Mac share/action extensions.

Inspect the content types, selection, Share entry point, target platform, and create/review/adapt request. Determine whether a proposed extension transfers information elsewhere or acts on it in context. Record available content and current task eligibility; do not assume every system destination supports every payload.

Use the standard Share button and system presentation where supported. Offer only relevant custom activities, avoid duplicate system actions, and name specialized variants distinctly with concise verbs. Do not prescribe system task order, which the app cannot control. Choose a familiar composition view; if custom UI is necessary keep it short and related to the host app. An extension is already modal, so avoid another modal except a necessary alert.

Implement the share payload/activities, deliver a payload-to-destination/action specification, or review exact relevance and handoff failures. If work continues after dismissal, specify background continuation and status in the main app; notify for problems rather than routine completion. On Mac use supported share/action extension entry points without claiming a Mac activity-view component; tvOS/watchOS lack activity views.

**Worked transformation:** Before: a document share sheet adds branded `Acme Print`, duplicates Print, and closes only after a large upload finishes. Decision: the custom action is redundant and long work should not trap the extension. After: retain system Print, name the distinct transfer `Send for Approval`, dismiss after accepting the task, and surface its status/problem in the app.

Deliver the artifact plus payload, custom eligibility, dismissal, and continuation contract. Verify with the actual selected content, unavailable destinations, cancellation, and post-dismissal work. Fail for missing payload, duplicate misleading actions, nested modal traps, or claimed ordering control. Separate extension execution from inspected specification.

Load [collaboration-and-sharing](../../../apple-hig-patterns/.topics/apple-hig-collaboration-and-sharing/SKILL.md) for permissions or [modality](../../../apple-hig-patterns/.topics/apple-hig-modality/SKILL.md) for extension exits.
来源:skillsdirectory

评论0

登录后参与评论

还没有评论,来抢沙发吧