27.3: 音の操作を Siri のツール(ToolIntent)にする

Open
#22 0 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@touyou is already working on this.

Since Nov 7, 2026.

Assessment

This issue has not been assessed yet.

Description

Siri の新しいモデル(iOS / macOS / visionOS 27.3)は、ToolIntent に適合した App Intent を「ツール」として選び、パラメータを埋めて呼べる。27.3 SDK が Xcode Cloud に来たら、このアプリの Intent をツールとして出す。

着手の条件: Xcode Cloud で 27.3 SDK のビルドが選べるようになってから(27.2 の Xcode ではビルドできない)。

やること

既存の Intent はそのまま残し、ゲートを掛けた extension で適合だけ足す(Intent 本体に @available(iOS 27.3, …) を付けると、27.3 より前の Shortcuts・Spotlight・App Shortcut から消える)。

#if canImport(AppIntents, _version: 301.2)  // 27.3 SDK(27.2 は 301.1)
@available(iOS 27.3, *)
extension SomeIntent: ToolIntent {}
#endif

ツールにする候補:

  • 音を鳴らす(PlaySoundIntent)
  • 音をパッドに割り当てる(AssignSoundToPadIntent)
  • 音を削除する(DeleteSoundIntent、確認つき)
  • 録音を始める(StartRecordingIntent)

前提: feature/sound-intents が main に入っていること。

同じ変更で見直すこと:

  • 題名と description は Siri のモデルが読む。何をするツールか、パラメータの各値の意味が分かるように書く(Swift の型名で呼ばない)
  • 結果は .result() だけにせず、値かダイアログを返す
  • 画面にいるときしか動かないツールにしない(Siri からはいつでも呼ばれる)
  • 確認なしの版(isDiscoverable = false の DeleteSoundNowIntent)はツールにしない。確認つきの方をツールにする
  • 検索用のツールは作らない。Entity を見つけられるようにして、パラメータで受ける

確認: Xcode 27.3 の Siri Metadata Analyzer(sirimetadataanalyzer)の指摘をなくし、実機の Siri で 1 つ呼ぶ。

参考: Xcode 27.3 の siri-app-integration スキル(references/tool-intents.md)。

Dominant language
Swift
Stars
2
Forks
0
Avg merge
6m
Merged PRs (30d)
21

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from touyou/CheckItOut

All issues in touyou/CheckItOut

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.