開発者のためのTouch on Mac:36ポイント、ジェスチャレコグナイザ、Sidecar
MacにやってきたTouchは、Mac開発者にとって何を変えるのでしょうか。 既存のアプリはそのまま動きます。「macOS automatically translates touches into clicks」(macOSがタッチを自動的にクリックへ変換する)からです。ルールを定めているのは3本のTech Talkです。ジェスチャレコグナイザは「the only way to get direct touches on macOS」(macOSで直接タッチを受け取る唯一の方法)であること、標準コントロールはタッチネイティブであること、タッチターゲットは36ポイントであること、ホバーに相当するものはないこと、そしてSidecarでつないだiPadがテスト環境になること。1234 タッチのAPIはmacOS 27.0 SDKにすでに入っています。一方で、システムジェスチャのスイッチとmacOSで使えるActivityKitは、私が確認した2つのSDKには見当たりません。Xcode 27.3ベータは「Coming soon」のままです。25678
TL;DR: Appleは、MacBook Pro with PROLED XDR Display(14.2インチと16.3インチ、予約受付は10月28日、店頭販売は11月6日から)でのTouchを発表し、同じ10月28日に3本のトークで開発者に対応方法を伝えました。129 アプリが標準のAppKitコントロール、SwiftUIのジェスチャ、Mac Catalystを使っているなら、トークによればそれらは「just work」(そのまま動く)です。それでも、後述の監査(ヒットターゲットとホバー)は当てはまります。独自のmouseDown(with:)コードは、コントロールイベントかジェスチャレコグナイザへ移行するまでエミュレーションで動きます。Apple以外のUIフレームワークには汎用のエミュレーション層が用意され、アプリが自分でタッチを扱うようになればNSIsTouchNativeでそれをオフにできます。36 AppKitで直接タッチを受け取るにはジェスチャレコグナイザが必要です。タッチはレスポンダチェーンにもイベントモニタにも届かないからです。36 デザインのトークはタッチターゲットを36ポイントと定めています。これはiOSの44ポイントと同じ物理サイズで、macOSの見た目はタッチがあってもなくても変わらない、とトークは言います。4 テストはSidecar経由のiPadで行います。最新の組み合わせはmacOS 27.2とXcode 27.2 RCですが、私はこの構成をまだ動かしていません。311 タッチのAPIはmacOS 27.0 SDKにすでに入っています。システムジェスチャのスイッチとmacOSで使えるActivityKitは、私が確認した2つのSDKにはなく、Xcode 27.3ベータは「Coming soon」です。2378
Appleが公開したもの、していないもの
Appleの発表は基調講演ではなくプレスリリースでした。当日の記録はライブ記事にあります。リリースのうち開発者向けの内容は、「Touch Arrives on Mac」の節にある3つの文です。まず「Apple apps are optimized for the new MacBook Pro, and many existing apps work with Touch right away, because macOS automatically translates touches into clicks」(Appleのアプリは新しいMacBook Pro向けに最適化されており、macOSがタッチを自動的にクリックへ変換するため、多くの既存アプリもすぐにTouchで動く)、続いて「Updated system gesture APIs also enable developers to create intuitive experiences designed specifically for Touch」(更新されたシステムジェスチャAPIにより、開発者はTouch専用に設計された直感的な体験も作れる)、そして「app developers can test how Touch performs in their iOS and iPadOS apps directly on the MacBook Pro display」(iOSとiPadOSのアプリでのTouchの動作を、MacBook Proのディスプレイ上で直接テストできる)という一文です。1 macOSについての節は、このラップトップが「comes to life with macOS 27」と述べ、「Touch built for macOS 27」と名前を挙げていますが、ポイントリリースは示していません。1
開発者向けの情報は午前11時47分(PT)までに出そろいました。ニュース投稿「Say hello to Touch on Mac」と、ランディングページ「Get ready for Touch on Mac」です。ページには3本のTech Talk、11月18日と19日のGroup Labs、そして「Coming soon」と記された3つのタイル「Xcode 27.3 beta」「Documentation resources」「Design resources」が並んでいます。2 ページのHTMLには、それらのタイルに付ける予定のリンクが、リソース公開時に再び有効にするための印を付けたコメントの中に入っています。AppKitの記事「Adopting gesture recognizers in your app」(今日の時点では404を返します)、既存のファイルプロミスを使ったドラッグ&ドロップのサンプル、そしてリンクの中にHuman Interface Guidelinesの4ページとApple Design Resourcesがあります。取得したHIGのページには、Macのディスプレイでのタッチについてのガイダンスはありません。Live Activitiesのページの変更履歴は10月13日で終わっています。2710
そのため、ルールの一次情報源はトークと、Appleが6月8日に公開したテクニカルノート「TN3212: Adopting gesture recognizers for Sidecar touch support」になります。このノートのOverviewは「In macOS 27, AppKit continues to standardize on gesture recognizers as the primary mechanism for input handling」(macOS 27で、AppKitは入力処理の主要な仕組みとしてジェスチャレコグナイザへの標準化を続ける)と述べ、「Explore updated APIs in macOS 27」「Detect touch capability」「Handle control events」「Configure scroll behavior」の各節が、10月28日のトークで実演されるAPIの範囲を説明しています。6 テクニカルノートが挙げる新しいシンボルは、すべてAppleのドキュメントにintroducedAtがmacOS 27.0、ベータ表示なしで載っています(10月28日正午(PT)に取得)。2つのInfo.plistキーを除けば、Xcode 27.1(27A9275)内のmacOS 27.0 SDKで宣言されていることも、このMacのヘッダとSwiftインターフェースで確かめました(筆者による分析)。7 トークが挙げる3つのシステムジェスチャのシンボルはそうではなく、macOSで使えるActivityKitもありません。どちらも後で扱います。
何もしなくていいこと、そしてそれで得られるもの
互換性の話は気前のよいものです。AppKitのトークはそこから始まります。「The good news is that we’ve already made touch work great out of the box for all apps. Across our native frameworks, standard components just work with native touch. Existing gestures created in SwiftUI just work」(0:30)。Mac Catalystについても同じです(0:52)。3 AppKitでは「Standard buttons, controls, tables, collections, split views, tabs, scrolling, and more are all touch native」(1:10)とされています。3
ネイティブでないものはエミュレーションされます。「for existing custom AppKit mouse interactions, or if you use non-Apple UI frameworks, AppKit intelligently emulates the mouse」(1:17)(既存の独自マウス操作やApple以外のUIフレームワークには、AppKitが賢くマウスをエミュレーションする)。3 テクニカルノートは、サードパーティのフレームワーク向けのエミュレーションを具体的に書いています。「A tap emulates a mouse-down followed immediately by a mouse-up」「A touch and immediate pan emulates trackpad scroll events, even if the UI doesn’t respond to them」「A long press without movement emulates a rightMouseDown(with:) (optionally followed by rightMouseDragged(with:)) with a rightMouseUp(with:) on touch lift」「A two-finger pinch or rotation simultaneously emulates both the trackpad magnify and rotate gestures」。つまりタップはクリック、タッチしてすぐのパンはトラックパッドのスクロール、動かない長押しは右クリック、2本指のピンチや回転はトラックパッドの拡大と回転になります。6 トークでの言い方は「a one-finger scroll with momentum, click, drag with a small hold delay, and even pinch for rotation and magnification」(11:28)です。3 このエミュレーションはウインドウ単位で、汎用的なものです。「AppKit can’t determine what kind of interactions are allowed at any particular location of your non-Apple UI framework content」(11:17)(Apple以外のフレームワークの内容では、どの位置でどんな操作が許されるかをAppKitは判断できない)からです。3
ネイティブ対応を加えたら、エミュレーションをオフにします。「add an NSIsTouchNative entry to your Info.plist to let AppKit know you are touch native and no longer need the non-Apple UI toolkit mouse emulations」(11:47)。3 このキーはmacOS 27.0としてドキュメント化されており、そのページには「Most AppKit apps don’t need this key. It’s primarily intended for apps that embed a non-AppKit rendering or input framework and implement their own touch-handling pipeline.」(ほとんどのAppKitアプリには不要で、AppKit以外の描画・入力フレームワークを組み込み、独自のタッチ処理を実装するアプリ向け)とあります。7
「何もしなくていい」が見た目の面で何を意味するかは、デザインのトークの枠組みが決めています。「macOS on a device that supports touch doesn’t look any different than macOS on a device that doesn’t. The resolution, the size of windows, text and UI controls haven’t changed」(0:41)、そして「Touch is a secondary input for macOS, and therefore has little impact on how macOS looks」(1:06)(タッチはmacOSにとって副次的な入力なので、見た目にはほとんど影響しない)。4 タッチモードもコンパクトなレイアウトもありません。これはiPhone Duoとは正反対の状況です。Duoでは内側ディスプレイが両方向ともregularのサイズクラスを報告します。
入口はジェスチャレコグナイザだけ
ほかのすべてを組み立てている一文は、AppKitのトークの3:45にあります。「In fact, gesture recognizers are the only way to get direct touches on macOS.」(実のところ、macOSで直接タッチを受け取る唯一の方法はジェスチャレコグナイザです)。3 その前には「Starting with macOS Golden Gate, gesture recognizers are the preferred approach in AppKit」(3:33)、そして「gesture recognizers have become the shared input language across SwiftUI, Mac Catalyst, and now AppKit」(3:38)(ジェスチャレコグナイザはSwiftUI、Mac Catalyst、そしてAppKitに共通の入力言語になった)という言葉があります。3 テクニカルノートは同じことを反対側から述べています。「AppKit doesn’t deliver Sidecar touch events through the responder chain or through event monitors」、そして注記として「Local and global event monitors don’t receive touch events. Touch events don’t go through NSApp or sendEvent(_:).」(タッチイベントはレスポンダチェーンにも、ローカル・グローバルのイベントモニタにも、NSAppやsendEvent(_:)にも流れない)。6
AppKitのコードベースにとって、これには3つの帰結があります。
1つ目は、トラッキングループです。トークのエンジニアは配線パズルを作り直します。このパズルは「a custom NSView with a mouseDown(with:) override that uses the standard tracking loop technique」(3:13)、つまりマウスアップまでnextEvent(matching:)を呼び続ける作りでした。そして「Migrate your mouse tracking loops to gesture recognizers」(3:51)と言います。3 移行は全部か無しかではありません。「tracking loops are still supported and can coexist with touch-only gesture recognizers. You may find that adding touch-only gesture recognizers is the fastest and least risky path for a dot release of your app」(3:58)(トラッキングループは引き続きサポートされ、タッチ専用のジェスチャレコグナイザと共存できる。マイナーリリースでは、タッチ専用のレコグナイザを足すのが最も速く、リスクも小さい道かもしれない)。3 最初の一歩は、トークが何かを足す前に行うリファクタリングです。「The first step is to refactor my tracking loop into separate start, continue, end, and cancel tracking functions」(4:11)。こうしておけば、マウスのループとタッチのレコグナイザが同じ関数を共有できます。3 Appleのコードリストをそのまま載せます。
// Refactored tracking functions
func startTracking(at viewLocation: NSPoint) { /* ... */ }
func continueTracking(at viewLocation: NSPoint) { /* ... */ }
func endTracking(at viewLocation: NSPoint) { /* ... */ }
func cancelTracking() { /* ... */ }
タッチ専用のレコグナイザの作り方は、プロパティへの代入2つだけです。「set the buttonMask to 0 and allowedTouchTypes to .direct on an initialized NSPanGestureRecognizer」(4:29)。3
// Add touch-only pan gesture recognizer
let touchRecognizer = NSPanGestureRecognizer(
target: self,
action: #selector(touchPan)
)
touchRecognizer.buttonMask = 0x0
touchRecognizer.allowedTouchTypes = .direct
wiringPanelView.addGestureRecognizer(touchRecognizer)
アクションは、レコグナイザの.began、.changed、.ended、.cancelledの各状態を4つの関数に振り分けます。キャンセルの経路が必要な理由は、トークがボタンについて述べたものと同じです。「If tracking is canceled due to a system gesture like Exposé, scroll, or any other reason, I can revert any unintended changes」(2:41)(Exposéやスクロールなどのシステムジェスチャでトラッキングがキャンセルされたら、意図しない変更を元に戻せる)。テクニカルノートのルールも「Handle cancellation.」です。36
// Pan gesture recognizer action function
@objc func touchPan(_ recognizer: NSPanGestureRecognizer) {
switch recognizer.state {
case .began:
startTracking(at: recognizer.location(in: wiringPanelView))
case .changed:
continueTracking(at: recognizer.location(in: wiringPanelView))
case .ended:
endTracking(at: recognizer.location(in: wiringPanelView))
case .cancelled:
cancelTracking()
default:
break
}
}
NSPanGestureRecognizerはmacOS 10.10から、allowedTouchTypesは10.12.2からあります。このレシピに新しいものは何もありません。7
2つ目は、レコグナイザが課すルールです。テクニカルノートには「If your view is covered by another, often transparent, view, your gesture recognizer won’t be triggered」、そして「You can’t place views on top of standard framework controls, because those controls now use gesture recognizers internally」とあります(別のビュー、しばしば透明なビューに覆われているとレコグナイザは反応せず、標準コントロールの上にビューを重ねることもできない)。ノート自身の回避策は「If necessary, rearrange the siblings, or override the occluding view’s hitTest(_:) method and return nil to ensure it doesn’t block events going to underlying controls.」です。6 独自のレコグナイザは必ず終わらせなければなりません。「End your active gesture recognizer by transitioning to ended, failed, or cancelled. If you don’t, recognizers are blocked from activating.」6 さらに、新しいSDKでビルドしたサブクラスに限った挙動の変更があります。「In apps built with the macOS 27 SDK and Xcode 27, location(in:) on NSGestureRecognizer returns NSZeroPoint and logs an error if the receiver’s class doesn’t override the method」。理由は「Subclasses of NSGestureRecognizer must implement location(in:) to report a meaningful location.」だからです。6
3つ目は、失うものです。コントロールのアクションについて、テクニカルノートはNSControlがレコグナイザへ移ったことで「changes the timing of when AppKit delivers control action messages with respect to event processing」と述べます。そのためcurrentEventは「no longer returns the event that triggered an action」(アクションを起こしたイベントを返さなくなる)となり、代わりにNSEvent.pressedMouseButtonsとクラスレベルのmodifierFlagsを案内したうえで、「a touch is not part of pressedMouseButtons」と付け加えています。6 左マウスのメソッドをオーバーライドするサブクラスには代償があります。「If you subclass an AppKit control and override any of the left-mouse responder methods, that control falls back to a tracking loop path for compatibility.」(互換性のためにトラッキングループの経路へ戻る)。6
コントロール:mouseDownではなくイベントで
AppKitのトークの最初のリファクタリングはボタンです。元のコードはNSButtonをサブクラス化し、mouseDown(with:)をオーバーライドしてトラッキングの開始と終了を知っていました。タッチでは「the buttons work, but AppKit must emulate mouse events to pass to the mouseDown override」(2:17)(ボタンは動くが、AppKitはオーバーライドに渡すためにマウスイベントをエミュレーションしなければならない)となります。3 置き換え先は、NSControlのイベントを「directly on NSButton without the need to subclass」(2:27)で使う方法です。トークのページにある2:24のコードリストは、ボタンにaddTarget(_:action:for:)を3回登録しています。対象は[.trackingBegan, .trackingEntered]、[.trackingExited, .trackingEndedInside]、そして.trackingCancelledです。イベントは、マウスのオーバーライドでは見えなかった状態も表に出します。「If tracking is canceled due to a system gesture like Exposé, scroll, or any other reason, I can revert any unintended changes」(2:41)。3 イベント自体は古いものです。「NSControl events are available for standard AppKit controls, and most control events are available all the way back to macOS 11」(2:51)。3 トークはこのパターンについて、自ら「Modernizing your AppKit app」と呼ぶWWDC26のセッションを参照しています。テクニカルノートが関連ビデオとして挙げるセッションは「Modernize your AppKit app」(WWDC26 session 289)です。36
macOS 27では、テクニカルノートの「Handle control events」の節によれば、NSControl.Eventsにケースが加わります。trackingRepeated(「An event when multiple mouseDown(with:) events with a click count greater than 1 occur」)、valueChanged(「An event when the value changes on continuous controls, such as sliders」)、primaryActionTriggered、menuActionTriggered(「An event that triggers when a menu gesture occurs, but before the menu presents」)、そして独自の用途に使うapplicationReservedです。67
次は排他性です。「By default, only one view can be interacted with at a time」(7:20)(デフォルトでは、一度に操作できるビューは1つだけ)。トークはこれをジェスチャの排他性と呼び、テクニカルノートは互換性の問題として説明します。「For maximum compatibility, AppKit restricts gesture activations to a single view hierarchy at a time」、そして「Unlike in iOS, the person can’t perform multiple interactions simultaneously, though scrolling is a notable exception.」(iOSと違って複数の操作を同時には行えないが、スクロールは例外)。36 これはビューごとに外せます。「The API to control gesture exclusivity is the exclusiveGestureBehavior property on NSView」(7:48)。このプロパティのデフォルトは「inherits its parent’s exclusive gesture behavior」(7:57)で、「By setting the exclusiveGestureBehavior property on the stove view to .notExclusive, the child slider subviews all become non-exclusive as well」(8:01)となります。アプリ全体で外すなら、Info.plistのNSViewGestureRecognizerIsExclusiveキーを使います。367 トークはこのプロパティが「is available in the next SDK」(7:54)と言います。しかしAppleのドキュメントはmacOS 27.0、ベータ表示なしとしており、6月のテクニカルノートもこれを説明しています。Xcode 27.1内のmacOS 27.0 SDKはNSView.hでAPI_AVAILABLE(macos(27.0))として宣言し、「Defaults to .inherit」というコメントまで付けています。つまり、トークが「next」と呼ぶSDKは、トークの公開時点ですでに出荷されていたことになります(インストール済みのヘッダからの筆者による分析)。367
36ポイント
デザインのトークはこの数字を3回挙げ、AppKitのトークも繰り返しています。「Touch on macOS uses a touch target of 36 points. This creates the same physical size on display as iOS’s 44 points」(9:17)(macOSのタッチターゲットは36ポイントで、ディスプレイ上ではiOSの44ポイントと同じ物理サイズになる)。4 このターゲットは意図して見えないようになっています。「All macOS’s framework controls have been updated to use this new touch target, but notice it’s invisible. The controls haven’t changed size and therefore don’t require a new layout」(9:26)(フレームワークのコントロールはすべてこのターゲットに更新されたが、見えない。サイズは変わらないので、新しいレイアウトは要らない)。4
独自のビューについての指示は、コントロールではなくヒット領域を広げることです。AppKitのトークの配線ノードは「a little tricky to touch」(5:14)だったため、エンジニアはexpandHitRectパラメータを加えました。これは「expands the size of the target rect to a minimum of 36 points on each axis. This makes it easier for a touch to hit a node while still requiring the mouse to be precise and without modifying the layout」(5:50)(ターゲットの矩形を各軸で最低36ポイントまで広げ、レイアウトを変えずに、マウスには従来どおりの精度を求めたまま、タッチでノードに当てやすくする)というものです。彼はこの手法を「for small resize or grab handles for selected objects in a canvas view」(6:07)に勧めています。3 Apple以外のコントロールについて、デザインのトークは「consider increasing the touch target area around your control instead of changing the control size」(9:51)と述べます。4
コントロールのサイズは変わりません。「When designing inspectors or other control-heavy areas, medium-sized controls continue to be the default control size. Window toolbars use extra-large-sized controls by default. Large and extra-large controls should not be used outside of the toolbar」(9:58)、そして「They should only be used sparingly to emphasize key moments or in apps of which content consumption is the primary use case」(10:14)。つまりインスペクタではmediumが引き続きデフォルト、ツールバーはextra-large、largeとextra-largeはツールバーの外では使わず、要所を強調するときやコンテンツ消費が主な用途のアプリでだけ控えめに使う、ということです。4 設定のようなビューには「use FormStyle. Here as well, each row by default measures the 36-point height」(10:28)です。4 smallとminiのコントロールも使って構いません。「They fully support touch regardless of their size」(10:46)。独自のものには1つだけルールがあります。「If your app is using custom small controls, ensure touch works, even though the tap target might be small」(10:50)。理由は「touch events should never be ignored」(11:00)(タッチイベントは決して無視されてはならない)だからです。4
36ポイントにできない3つのコントロールについては、フレームワークが難しい部分を引き受けます。「the stepper, dial, and slider」(13:54)は「now expand in place when interacting via touch」(14:07)となり、展開するタップでは値が変わらず(14:26)、「collapse themselves when I’m not interacting with them」(14:41)。スライダーについてはオプションで、「sliders have the option to expand when presented small」(15:36)です。4 メニューも適応します。「when using touch, the menu shows slightly larger rows to help make selection easier」(11:23)。一時的なビューも同様です。「views in your app that are briefly presented, such as popovers or custom menus, can show slightly altered layouts depending on the input used to invoke them」(11:29)(ポップオーバーや独自メニューのように短時間表示されるビューは、呼び出した入力に応じてわずかに異なるレイアウトにできる)。4
ホバーはなくなる
「Direct touches don’t have an equivalent to mouseMoved events」(10:38)(直接タッチにはmouseMovedイベントに相当するものがない)。そのため、ロールオーバーで現れるものにはすべて判断が必要になります。3 AppKitのトークのルールはこうです。「don’t change your app experience to permanently show hidden controls」(10:49)、「Static data like tooltips shouldn’t be revealed on touch」(10:53)、そして「for hidden essential controls, install a touch-only click gesture recognizer to temporarily show the element on a touch tap」(10:57)。隠れたコントロールを常に表示するようには変えず、ツールチップはタッチで出さず、欠かせない隠れたコントロールにはタッチ専用のクリックレコグナイザを付けてタップで一時的に表示する、ということです。3 テクニカルノートは、ポインタの経路には手が加わっていないことを確認しています。「Hovering via mouseMoved(with:) is still managed with NSTrackingArea.」6
デザインのトークのルールは、ユーザー側から見た同じものです。「hover actions that are purely showing information, like tooltips, are not required to work with touch」(11:53)。タッチですでに簡単な操作にはアフォーダンスは不要で、たとえばカルーセルのスクロールボタンは「remain hidden during a touch interaction」(12:22)。これは「horizontal scroll is always possible via touch」(12:19)だからです。「only the most important hover actions relevant to that content should reveal themselves」(12:30)とされ、Safariはページに触れたときにちょうど2つだけを表示します(12:36)。そして「actions that appear on hover be duplicated elsewhere in your UI」(13:05)。リマインダーの共有ボタンは、タッチでは行のコンテキストメニューに置かれています(13:20)。4
スクロール、長押し、ドラッグ、テキスト
スクロールは、ディスプレイでは1本指、トラックパッドでは2本指です(4:39)。4 1本指でスクロールではなく描画させたいとき、AppKitのトークは「the decorating view’s enclosing scroll view to require two touches minimum for touch scrolling」(6:40)と設定します。プロパティはNSScrollView.minimumNumberOfTouchesForScrolling(macOS 27.0)で、隣にmaximumNumberOfTouchesForScrolling、isTouchScrollingEnabled、scrollGestureForRelationshipsがあります。37 スクロールに負けるべきレコグナイザはisCancellableByScrollGestureを設定します。「NSScrollView now supports pull-to-refresh functionality」とあり、これはNSRefreshControllerを通じて行います。NSPanGestureRecognizerでは、minimumNumberOfTouchesとmaximumNumberOfTouchesの組が「replace numberOfTouchesRequired」とされ、numberOfTouchesRequiredは27.0で非推奨になりました。67
Macのタッチでは、長押しがドラッグとコンテキストメニューの両方を担い、AppKitがそれを調停します。「When a draggable item is long pressed, it should hint at its draggability with a lift animation. To get the drag-and-drop lift preview, use the existing drag-and-drop delegate APIs on NSTableView, NSOutlineView, and NSCollectionView」(9:49)(ドラッグ可能な項目は長押しで持ち上がるアニメーションを見せるべきで、そのプレビューは既存のドラッグ&ドロップのデリゲートAPIで得られる)。3 メニューについては「Use the menu property on NSView or override menu(for:). AppKit will detect this and automatically install the appropriate gesture recognizers, which include a control-tap gesture recognizer as an accelerator」(10:11)、そして「When using both this menu API and the container view drag-and-drop delegate APIs, AppKit will coordinate when a long press becomes a drag-and-drop operation or a context menu one, even allowing the user to switch between them」(10:25)(両方のAPIを使えば、長押しがドラッグになるかコンテキストメニューになるかをAppKitが調整し、途中で切り替えることもできる)。3 デザインのトークはユーザー側の見え方を示しています。写真は「scales up under my finger」(3:50)、その横にコンテキストメニューが現れ(3:58)、ドラッグするとメニューが閉じます(4:05)。タッチでドラッグしている間もShiftとOptionは効きます(4:13)。4 独自のビューでは、beginDraggingSession(items:gesture:source:)が「a drag from a gesture recognizer」を開始します。これは27.0で新しく加わりました。67
テキストは手薄なところです。テクニカルノートにある一文は「NSTextSelectionManager allows custom text engines to support standard text gestures」で、このクラスはmacOS 27.0としてドキュメント化され、概要は「An object that coordinates text selection behavior for custom text views.」です。67 契約の中身はヘッダが補っています(筆者による分析)。このクラスは「provides a centralized way to manage text selection interactions using a set of gesture recognizers」もので、編集可能、選択のみ、操作不可のいずれかの操作モード、選択範囲を保持するデリゲート、そしてレイアウトのデータソースを持ちます。7 どちらのトークも、タッチでの挿入ポイント、選択ハンドル、編集メニューには触れていません。デザインのトークの選択についてのガイダンスは項目の選択についてで、「on macOS we recommend to allow modeless selection through click and tap」(2:42)、つまり1回のタップで選択、ダブルタップで開く(3:10)というものです。4
システムジェスチャと、ドキュメント化されていないスイッチ
macOSは、ディスプレイ上の一連の複数指ジェスチャを自分のものにしています。これらは「controlled by macOS and are therefore not available to any app running」(8:05)(macOSが制御するため、どのアプリも使えない)です。3本指の上スワイプでMission Control、下スワイプでApp Exposé(8:13)、親指と3本指のピンチでアプリを表示し、広げるとデスクトップを表示(8:22)、3本指の左右でスペース間を移動(8:32)、上端と下端からのスワイプで隠れたメニューバーとDock(8:37)、Dynamic Islandの上をスワイプしてSiriを呼び出す(8:46)、そして端からのスワイプで通知センターとコントロールセンター(8:51)です。4
AppKitのトークは3つのスライダーでこの衝突にぶつかります。「if I try to control three or more sliders in the same direction at the same time, I get the system gesture instead」(8:17)。そしてスイッチを見せます。「I can control system gesture availability at the window level with the disablesDirectTouchSystemGestures property on NSWindow. SwiftUI and Mac Catalyst also have similar API on UIViewController and View」(8:25)(ウインドウ単位でシステムジェスチャの可否を制御でき、SwiftUIとMac Catalystにも同様のAPIがある)。警告も添えています。「Only disable system gestures if the interaction capabilities they open up are critical for the window」(8:42)。3 トークのページのコードリストは3つすべての名前を挙げています。NSWindowのdisablesDirectTouchSystemGestures、UIViewControllerのprefersDirectTouchSystemGesturesDisabled、SwiftUIのViewのdirectTouchSystemGesturesDisabled()です。3 10月28日の時点で、この3つはいずれもAppleのドキュメントにありません。JSONエンドポイントは404を返し、AppKit、UIKit、SwiftUIのインデックスにもシンボルが見当たりません。7 Appleの言葉ではなく私の読みですが、これは、トークが前提としているSDKが「Coming soon」と記されたものであることを最もはっきり示すしるしです。
SwiftUIとMac Catalyst
SwiftUIに加わる新しい型は1つです。「if you have a specialized need to distinguish between mouse and direct touch input, you can use the new GestureInputKinds gesture modifier API」(0:43)(マウスと直接タッチを区別する特別な必要があれば、新しいGestureInputKindsを使える)。3 GestureInputKindsは7つのプラットフォームすべてで27.0としてドキュメント化されています。メンバーは.directTouch(「A person is touching content directly」)、.pointer(「A person is pressing a mouse or a trackpad button while the pointer is pointing at content」)、.indirectTouch、.pencil、.allで、onTapGesture、onLongPressGesture、そしてTapGesture、SpatialTapGesture、LongPressGesture、DragGesture、MagnifyGesture、RotateGestureの各イニシャライザにinputKinds:パラメータがあります。7 テクニカルノートの一文は「Use GestureInputKinds to limit gestures to specific types of input in SwiftUI.」です。6
Mac Catalystは、UIKitがiOS 9から持っているものを使います。トークは「UITouch.touchType and UIGestureRecognizer’s allowedTouchTypes」(0:59)と言いますが、ドキュメント化されたプロパティはUITouch.typeで、列挙型はUITouch.TouchTypeです。allowedTouchTypesはMac Catalyst 13.1からUIGestureRecognizerにあります。37 トークの言い回しは言い間違いで、新しいAPIではありません。
MacのLive Activities、ドキュメントより先に
3本目のトークは短く、大きな主張をしています。「The Dynamic Island has come to the Mac. To fully take advantage of its capabilities, Mac apps now support native Live Activities」(0:05)、そして「now in macOS Golden Gate, applications running on the Mac can create Live Activities directly」(0:57)(Dynamic IslandがMacに来て、MacのアプリがネイティブにLive Activitiesを作れるようになった)。5 「Universal applications with existing Live Activities will work on the Mac with no code change, and native macOS apps can create Live Activities directly through the Live Activities API」(1:03)。5 表示場所は「On a Mac with Dynamic Island, Live Activities blend in seamlessly into the top edge of the device. On other devices and displays, they are shown in the menu bar」(1:14)(Dynamic IslandのあるMacでは上端に溶け込み、それ以外ではメニューバーに表示される)です。5 コードはiOSのコードと同じです。データモデルはActivityAttributesに(2:36)、コンパクトとミニマルの表示はDynamic IslandのビュービルダーとともにActivityConfigurationに(3:24)。Mac固有の表示は1つだけで、「The menu bar expanded Live Activity view is created along with the ActivityConfiguration as a simple view」(3:52)、一方で「Expanded Live Activities in the Dynamic Island are defined with the Dynamic Island view builder」(4:02)です。「This same code works on iOS and macOS」(4:30)。開始は即時、予約、プッシュのいずれか(4:40)、「with existing backgrounding technologies on the Mac, like background tasks and user agents」との連携(4:54)、App Intentsによるアクション(5:56)、そして「If you have an iOS activity, there’s no code to port」(7:09)。5 iOSから引き継がれるルールが2つあります。「Only a single Live Activity can be expanded at a time」(3:12)、そして「An activity is only expanded when interacted with or if explicitly triggered through an alert request」(3:06)です。5
Appleのドキュメントは、まだこれを述べていません。ActivityKitフレームワークのページの概要は「the Mac」を挙げていますが、Overviewには「On Mac, it appears in the Menu bar」とあり、プラットフォームの一覧はiOS、iPadOS、Mac Catalyst 16.1です。Activity、ActivityAttributes、ActivityConfiguration、DynamicIsland、そしてNSSupportsLiveActivitiesキーのいずれにもmacOSのプラットフォームは載っていません。87 HIGのLive Activitiesのページは、変更履歴が10月13日で終わっており、いまもペアリングしたiPhone経由の経路だけを説明しています。「Active Live Activities automatically appear in the Menu bar of a paired Mac」「Clicking the Live Activity launches iPhone Mirroring to display your app」、そして「macOS dimensions」の見出しの下に「Use the provided iOS dimensions.」とあります。10 SDKはトークではなくドキュメントと一致しています。Xcode 27.1内のmacOS 27.0 SDKでも、Xcode 27.2ベータ(27B5019j)内のmacOS 27.2 SDKでも、ActivityKitのmacOSインターフェースはActivityAttributes、Activity、すべてのrequestとupdateを@available(macOS, unavailable)としています。このMacで確認しました(筆者による分析)。ですから、計画に書くべき文は控えめなものです。トークはmacOS Golden Gateにこの機能があると言っていますが、ドキュメントも、私が確認したどちらのSDKも、まだそれをビルドさせてくれません。ステートマシンの記事では、開始、更新、終了という共通のモデルをiOSで実装した例を示しています。Mac独自の持続時間、解除、バックグラウンドの制限は、まだどの情報源にもありません。
デザイン:macOSは変わらない
デザインのトークの締めくくりのルールは、そのまま全部載せられるほど短いものです。「Avoid redesigning your app just to support touch. Your app on a Mac that supports touch should have no visual distinction from your app on a Mac that doesn’t」(16:05)。「Use gestures to navigate your app and directly manipulate your content」(16:14)。「Use 36 points as a touch target on macOS, and use Apple frameworks to get touch-optimized layouts and expandable controls」(16:18)。「Most apps will work great with touch right away」(16:28)。「Keep keyboard and mouse as a primary input」(16:31)。タッチのためだけに作り直さず、見た目の違いを作らず、ジェスチャで操作し、36ポイントを使い、キーボードとマウスを主な入力のままにする、ということです。4
空間についてのルールは1つだけで、それはポーズではなく手の話です。「The edges of the display are easy to touch by grabbing the side of the display with my hand」(6:17)。そのため「The left and right side of my app window are therefore best used to show rich controls and dense UI, such as inspectors and navigation sidebars」(6:29)、一方で「the center of the display is best used for coarse, imprecise and big gestures」(6:46)となります(端は手でつかみやすいので密度の高いUIに、中央は大まかで大きなジェスチャに)。4 独自のジェスチャには3つの制約があります。「your gestures should work with touch and trackpad and possibly Magic Mouse」(7:00)、「Avoid adding gestures that only work with touch」(7:05)、そして「The action your gesture does should be duplicated elsewhere in the UI, for example in a menu」(7:37)です。4 トークは、Macにこれまでなかったことも認めています。「macOS now allows multiple touch gestures at the same time」(5:30)。例はLogicの2つのスライダーを2本の指で動かす場面です(5:45)。4 これは前述の排他性プロパティのユーザー側の姿です。AppKitのデフォルトは一度に1つのビュー階層だけを有効にし、.notExclusiveがアプリに残りを開く方法です。36
いまテストする:Sidecar、そしてまだないSDK
ラップトップは要りません。「With the latest macOS beta and developer tools, all the touch features of the Mac with Touch Display are available with an iPad connected to your Mac with Sidecar」(11:59)、そして「The fastest way to get started with touch on Mac is with the Sidecar tools you already own」(12:09)(最新のmacOSベータと開発ツールがあれば、SidecarでつないだiPadでタッチのすべての機能を使える)。3 テクニカルノートはiPadにiPadOS 27を求め、タッチ対応の判定(NSScreen.touchCapabilities、.multiTouchビットを持つオプションセット)について注意を加えています。macOS 27では、この判定は「returns true for all displays when a touch-capable Sidecar display is connected, not just for the Sidecar display」(タッチ対応のSidecarディスプレイが接続されていると、Sidecarだけでなくすべてのディスプレイでtrueを返す)となります。そのうえで「it’s better to handle events regardless of input source and decide on an alternate presentation based on the interaction type, if needed」と助言しています。67
トークの監査手順を、トーク自身の順序で示します。「start testing your application with touch on macOS with Sidecar. Then audit your code for mouseDown(with:) overrides. Determine if you can use control events or delegate methods instead, or if you need to add your own touch-specific gesture recognizers. Look for areas that have small hit targets and expand them for touch. And finally, add an affordance or use a tap to reveal essential hidden UI」(12:24)。3 スキルもあります。「there’s a gesture modernization skill that has an understanding of the features and changes I’ve talked about」(12:16)。ランディングページのXcodeのタイルにはTK skillというプレースホルダのコメントがあり、その名前を挙げている情報源はありません。23
出荷済みのSDKに何が入っているか。このMacのヘッダとSwiftインターフェースから見た筆者による分析です。Xcode 27.1(27A9275)内のmacOS 27.0 SDKは、NSScreen.TouchCapabilities、5つの新しいNSControlイベントケース、NSScrollViewのタッチ関連プロパティ、NSRefreshController、beginDraggingSession(items:gesture:source:)、exclusiveGestureBehaviorを、すべてAPI_AVAILABLE(macos(27.0))で宣言しています。SwiftUIが再エクスポートするSwiftUICoreのmacOSインターフェースはGestureInputKindsを宣言しています。3つのシステムジェスチャのスイッチは、そのSDKにも、Xcode 27.2ベータ(27B5019j)内のmacOS 27.2 SDKにもありません。AppKitのヘッダ、SwiftUIのインターフェース、Mac CatalystのUIKitヘッダのいずれにもなく、ActivityKitのmacOSインターフェースはどちらのSDKでもAPIを使用不可としています。78
私が確認したのはこの2つのSDKです。Xcode 27.2 RC(27B48)はAppleのリリースフィードで10月19日付けとなっており、あのベータより新しいものですが、確認していません。ですから、ここで述べた欠落は名前を挙げたSDKについてのみ成り立ち、それ以上には及びません。11
いまテストするために入れるもの(私自身は試していません):macOS 27.2(26B123、フィードによれば10月26日リリース)とXcode 27.2 RC、そしてSidecarでつないだiPadOS 27のiPadです。テクニカルノートはSidecarのタッチがmacOS 27で動くと説明しており、フィードには10月28日の時点でmacOS 27.3ベータは載っていません。611 RC自身のノートから注意点を1つ。「macOS, watchOS, tvOS, and visionOS SDKs in Xcode 27.2 incorrectly report 27.1 as a valid deployment target」、そして「Mac Catalyst builds with a 27.1 or 27.2 deployment target might be unable to use newly introduced API」とあります。ですから、macOSのデプロイメントターゲットに27.1を選ばないでください(リリースフィードにはmacOS 27.0.1と27.2があり、macOS 27.1はありません)。また、デプロイメントターゲットが27.1か27.2のMac Catalystで新しいAPIが見えない場合は、シンボルの欠落ではなくこの既知の問題として読んでください。11
では、まだないものは何か。ランディングページが約束するXcode 27.3ベータ、そこからリンクされるAppKitの記事、3つのシステムジェスチャのシンボルとmacOSで使えるActivityKit(確認した2つのSDKにはなく、27.2 RCでは未確認)、そしてシミュレータについての言及です。Xcode 27.2 RCのノートがタッチに触れるのは1回だけで、「after a period of inactivity」に止まった入力についてのDevice Hubの修正です。macOS 27.2のノートには、タッチ、ジェスチャ、Live Activitiesの項目はありません。11 タッチのAPIはXcode 27.1とともに出荷され、ルールは公開され、次に来るものをランディングページは「Coming soon」としています。
あらゆるMacアプリのためのタッチ監査
Appleのガイダンスではなく筆者による分析です。トークの4つのステップを、順番どおりチェックリストにしました。実行時のテストによる裏付けはまだありません。
- iPadOS 27のiPadをSidecarでつなぎ、最新のmacOSとXcode(macOS 27.2とXcode 27.2 RC)で、何かを変える前にアプリのすべての画面に触れてみる。
mouseDown(with:)のオーバーライドとnextEvent(matching:)のループを検索し、それぞれをコントロールイベント、デリゲートメソッド、ジェスチャレコグナイザのいずれかに割り当てる。- 小さなコントロールとヒット領域を見直し、役立つところではレイアウトを変えずにタッチ領域を広げる。トークは、タッチで動きさえすれば小さめのコントロールも認めている。
- ロールオーバーで現れるものをすべて書き出し、項目ごとに判断する。ツールチップはマウス専用のまま。タッチですでに簡単な操作には何も要らない。欠かせないコントロールには、タッチ専用のクリックレコグナイザと、コンテキストメニューなどUIの別の場所での置き場を用意する。
この監査から生まれないものが1つあります。作り直しです。デザインのトークの第一のルールは、見た目の違いがあってはならないというものだからです。入力によって変わってよいレイアウトは、ポップオーバーや独自メニューのような一時的なものだけです。
Appleがまだ言っていないこと
以下は、いずれも情報源が答えを出していない問いです。リリース、ランディングページ、3本のトーク、テクニカルノート、仕様ページ、Xcode 27.2 RCとmacOS 27.2のノート、そしてHIGの4ページと照らし合わせて確認しました。
- 内蔵ディスプレイのTouchを担うのはどのmacOSポイントリリースか、そしてドキュメント化されていない3つのシンボルを担うのはどのSDKか。リリースは「macOS 27」と言い、macOS 27.2の名前はSiri AIの脚注でしか出てきません。ランディングページは「Xcode 27.3 beta」「Coming soon」です。
- 古いSDKでビルドしたバイナリが、macOS 27 SDKで再ビルドしたものと同じタッチの挙動を得るのか。トークは「all apps」と言い、テクニカルノートが新しいSDKに結びつけているのは
location(in:)の変更だけです。 - ディスプレイ上でのApple Pencilや筆圧、そしてガラスが触れる前の指を感知するのか。トークはマウスのようなホバー状態がないことを扱っていますが、ペンシル、筆圧、近接検知に触れた情報源はありません。
GestureInputKinds.pencilはほかのメンバーと同じくmacOS 27.0として載っていますが、ディスプレイがペンシルを感知すると述べた情報源はありません。7 - 外部ディスプレイやクラムシェルモードでのタッチ、そしてユーザーがTouchをオフにできるのか。
- タッチによるテキスト編集:挿入ポイント、ハンドル、ルーペ、編集メニュー。
- タッチディスプレイでのアクセシビリティ。仕様ページはこのラップトップの機能としてAssistiveTouchとTouch Accommodationsを挙げていますが、それがMacにとって新しいものかどうかは述べていません。9
- 「Designed for iPad」アプリがMacのディスプレイでタッチをどう受け取るのか、そしてそれはMac Catalystと違うのか。
- iPadなしでMacのタッチを試せるシミュレータやDevice Hubの経路。
- Webコンテンツ:WKWebViewとSafariは、ページにタッチイベントとポインタイベントのどちらを渡すのか。
- ウインドウやフルスクリーンのコンテンツがDynamic Islandとどう関係するのか、そしてどのセーフエリアAPIがそれを報告するのか。
- macOSでのLive Activitiesの詳細:ポイントリリースとSDK、
NSSupportsLiveActivitiesが必要かどうか、Macでのpush-to-startとAPNsの登録の仕組み、そしてMacネイティブのアクティビティの寸法。
日程
- 10月28日:30の国と地域で予約受付開始。開発者向けページと3本のトーク。テクニカルノートは6月8日から公開されています。126
- 11月6日:ラップトップが顧客と店頭に届きます。1
- 11月18日午前9時〜10時(PT)、11月19日午後6時〜7時(PT):Touch on Mac Group Labs。オンラインで、Appleのエンジニアとデザイナーが参加します。2
- 「Coming soon」:Xcode 27.3ベータ、ドキュメントのリソース、デザインのリソース。2
- この11月:リリースが説明するLogic ProとFinal Cut Proのタッチ機能を含むApple Creator Studioのアップデート。リリースが名前を挙げるサードパーティアプリは「will be available later this year」(年内に提供予定)です。1
要点
AppKit開発者へ: 標準コントロールはもうタッチネイティブです。独自のmouseDown(with:)コードは、コントロールイベントかジェスチャレコグナイザへ移るまでエミュレーションで動きます。buttonMask = 0とallowedTouchTypes = .directを設定したタッチ専用のNSPanGestureRecognizerが、トークの勧めるマイナーリリースでの道です。APIは、すでに手元にあるmacOS 27.0 SDKに入っています。37
SwiftUIとCatalystの開発者へ: ジェスチャはすでに動きます。GestureInputKindsがSwiftUIで唯一の新しい型で、Catalystでの答えはUITouch.typeとallowedTouchTypesです。37
デザイナーへ: 36ポイント、ただし見えない。作り直しはしない。欠かせないホバー操作はタッチで届くようにし、コンテキストメニューなどUIの別の場所にも置く。ツールチップは例外。密度の高いUIは端に、大まかなジェスチャは中央に。4
計画のために: いまSidecarでテストしましょう。システムジェスチャを無効にするものや、MacネイティブのLive Activityを作るものを組み始める前に、インストール済みのSDKがそれらのAPIを宣言しているか確かめてください。ここで調べた2つのSDKは宣言しておらず、Xcode 27.2 RCは未確認です。Appleが約束している次のSDKはXcode 27.3ベータです。278
よくある質問
既存のMacアプリはTouchで動きますか。
Appleはほとんどのアプリについて、動くと言っています。「many existing apps work with Touch right away, because macOS automatically translates touches into clicks」(多くの既存アプリは、macOSがタッチをクリックに自動変換するため、すぐにTouchで動く)。AppKitのトークも、標準のAppKit、SwiftUI、Mac Catalystのコンポーネントと既存のジェスチャは「just work」と述べています。13 独自のマウストラッキングのコードは、コントロールイベントかジェスチャレコグナイザへ移るまでエミュレーションで動きます。Apple以外のUIフレームワークには汎用のエミュレーション層があり、アプリが自分でタッチを扱うようになればNSIsTouchNativeでそれをオフにします。36
AppKitで直接タッチを受け取るには、どうすればよいですか。
ジェスチャレコグナイザを使います。トークは「gesture recognizers are the only way to get direct touches on macOS」と言い、テクニカルノートは、タッチイベントがレスポンダチェーン、イベントモニタ、NSApp、sendEvent(_:)を通らないと述べています。36 タッチ専用のレコグナイザは、buttonMaskを0に、allowedTouchTypesを.directに設定します。3
macOSのタッチターゲットはどれくらいですか。
36ポイントで、「the same physical size on display as iOS’s 44 points」(ディスプレイ上ではiOSの44ポイントと同じ物理サイズ)です。フレームワークのコントロールはサイズを変えずにすでにこれを満たしています。独自のビューでは、ビューそのものではなくヒット領域を広げましょう。43
新しいMacBook ProなしでTouchをテストするには。
iPadOS 27のiPadをSidecarでつなぎます。トークの条件は「With the latest macOS beta and developer tools」(11:59)ですが、macOS 27.3ベータはまだ出ていません。そこで私が試すとすればmacOS 27.2とXcode 27.2 RCの組み合わせですが、自分ではまだ試していません。3611
タッチのAPIは、いまのSDKに入っていますか。
入っています。トークが実演するもののうち、システムジェスチャのスイッチとMacネイティブのLive Activitiesを除くすべてです。この2つは、ここで調べた2つのSDKにはありません(Xcode 27.2 RCは調べていません)。Xcode 27.1内のmacOS 27.0 SDKは、NSScreen.TouchCapabilities、新しいNSControlイベントケース、NSScrollViewのタッチ関連プロパティ、NSRefreshController、exclusiveGestureBehavior、そしてジェスチャベースのドラッグセッションを宣言しており、SwiftUICoreのインターフェースはGestureInputKindsを宣言しています。Appleのドキュメントはこれらをベータ表示なしのmacOS 27.0としています。7 ウインドウ、ビューコントローラ、ビューのシステムジェスチャのスイッチは、ドキュメントにもXcode 27.1や27.2ベータのSDKにもありません。ActivityKitはどちらのSDKでもmacOSでAPIを使用不可としており、ランディングページはXcode 27.3ベータを「Coming soon」としています。278
MacアプリでLive Activitiesを作れますか。
トークは、macOS Golden Gateでは作れると言っています。iOSと同じActivityKitとWidgetKitのコードで、Dynamic IslandのないMacではメニューバーに表示されます。5 ActivityKitのドキュメントとHIGは、アプリが作るアクティビティのプラットフォームとしてまだmacOSを挙げておらず、ペアリングしたiPhone経由のメニューバーの経路を説明しています。Xcode 27.1と27.2ベータのSDKにあるActivityKitのインターフェースは、macOSでAPIを使用不可としています。108
この記事の事実はどこから来ていますか。
リリース、開発者向けのニュース投稿とランディングページ、3本のTech Talkの英語字幕トラック(引用ごとに最初のキューを括弧で示しています)、6月のテクニカルノート、名前を挙げたすべてのシンボルについてのAppleのドキュメントJSON、仕様ページ、Xcode 27.2 RCとmacOS 27.2のリリースノート、そしてHIGの4ページです。いずれも2026年10月28日に取得しました。これに加えて、私のMacにあるmacOS 27.0とmacOS 27.2ベータのSDKのヘッダとSwiftインターフェースを調べており、これは筆者による分析です。報道は情報源にしていません。
出典
-
Apple Newsroom、Apple unveils groundbreaking MacBook Pro with PROLED XDR Display、2026年10月28日。Newsroomのフィードで最初に確認したのは午前10時9分(PT)です(フィードの
updatedスタンプは17:09:28Z)。節は「Touch Arrives on Mac」「Say Hello to the Dynamic Island on Mac」「macOS 27 Golden Gate」。価格と販売時期、サードパーティアプリについての脚注4。 ↩↩↩↩↩↩↩↩ -
Apple Developer、Say hello to Touch on Mac、2026年10月28日。およびGet ready for Touch on Mac、2026年10月28日午前11時49分(PT)に取得。3本のトーク、11月18日午前9時〜10時(PT)と11月19日午後6時〜7時(PT)の「Touch on Mac Group Labs」、そして「Xcode 27.3 beta」「Documentation resources」「Design resources」の各タイル。いずれも「Coming soon」と記され、リンクはHTMLのコメントの中に保持されています。 ↩↩↩↩↩↩↩↩↩↩↩↩
-
Apple Developer、Tech Talk Bring Touch to your Mac app、13:19、Raleigh Ledet、2026年10月28日。引用は英語字幕トラックからで、括弧内の時刻は引用した範囲の最初のキューです。トークのページにあるコードリストには、「Use NSControl events to detect tracking」(2:24)、「Refactored tracking functions」(4:11)、「Add a touch-only pan gesture recognizer」(4:24)、「Pan gesture recognizer action」(4:52)、「Require two touches for scrolling」(6:40)、「Allow simultaneous slider interaction」(7:48)、「Disable system gestures」(8:25)、「Declare touch-native support in Info.plist」(11:47)などがあります。記事に載せた3つのコードリストは、ページから逐語で写したものです。 ↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩
-
Apple Developer、Tech Talk Design for touch on Mac、16:52、Cas Lemmens、2026年10月28日。引用は英語字幕トラックから、最初のキューを括弧内に示しています。 ↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩
-
Apple Developer、Tech Talk Bring Live Activities to Mac、7:40、Jonathan Tilley、2026年10月28日。引用は英語字幕トラックから、最初のキューを括弧内に示しています。 ↩↩↩↩↩↩↩
-
Apple Developer Documentation、TN3212: Adopting gesture recognizers for Sidecar touch support、改訂履歴「2026-06-08 First published」、2026年10月28日正午(PT)に取得。引用した節:Overview、「Understand how gesture recognizers gather events」「Handle Sidecar touch input」「Update your event-handling code」「Implement custom gesture recognizers」「Handle tracking loop compatibility」「Update to gesture recognizer behavior」「Support third-party UI frameworks」「Explore updated APIs in macOS 27」「Detect touch capability」「Handle control events」「Configure scroll behavior」「Work with text and dragging」「Handle deprecations and behavior changes」。 ↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩
-
AppleのドキュメントJSON(
developer.apple.com/tutorials/data/documentation/<path>.json、ここでリンクしたページの裏にあるデータ)、2026年10月28日午前11時55分〜午後12時5分(PT)に取得。ベータ表示なしのmacOS 27.0として載っているもの:NSScreen.TouchCapabilitiesと.multiTouch、NSControl.Eventsの.trackingRepeated、.valueChanged、.primaryActionTriggered、.menuActionTriggered、.applicationReserved、NSScrollViewの.isTouchScrollingEnabled、.minimumNumberOfTouchesForScrolling、.maximumNumberOfTouchesForScrolling、.scrollGestureForRelationships、.refreshController、NSRefreshController、NSPanGestureRecognizer.minimumNumberOfTouchesと.maximumNumberOfTouches、NSGestureRecognizer.isCancellableByScrollGesture、NSView.exclusiveGestureBehaviorとExclusiveGestureBehavior、NSView.beginDraggingSession(items:gesture:source:)、NSTextSelectionManager、NSIsTouchNative(そのページ:「Most AppKit apps don’t need this key. It’s primarily intended for apps that embed a non-AppKit rendering or input framework and implement their own touch-handling pipeline.」)、NSViewGestureRecognizerIsExclusive、そしてメンバーを含むGestureInputKinds(7つのプラットフォームすべてで27.0)。それより古いもの:NSGestureRecognizerと具体的なサブクラス(macOS 10.10)、allowedTouchTypes(10.12.2)、NSControl.Eventsのトラッキング関連のケース(11.0)、UITouch.typeとUIGestureRecognizer.allowedTouchTypes(iOS 9.0、Mac Catalyst 13.1)。numberOfTouchesRequiredは27.0で非推奨。見つからなかったもの(HTTP 404、フレームワークのインデックスにもなし):NSWindow.disablesDirectTouchSystemGestures、UIViewController.prefersDirectTouchSystemGesturesDisabled、SwiftUIのdirectTouchSystemGesturesDisabled()、そして記事「Adopting gesture recognizers in your app」。2026年10月28日のSDKの確認(筆者による分析)、Xcode 27.1(27A9275)内のMacOSX27.0.sdk:NSView.hの583行目は、「Defaults to.inherit」というコメントの下で@property NSViewExclusiveGestureBehavior exclusiveGestureBehavior API_AVAILABLE(macos(27.0));となっています。NSScreen.hはNSScreen.TouchCapabilitiesとtouchCapabilitiesを宣言。NSControl.hはNSControlEventTrackingRepeated、ValueChanged、PrimaryActionTriggered、MenuActionTriggered、ApplicationReservedを宣言。NSScrollView.hはtouchScrollingEnabled、minimumNumberOfTouchesForScrolling、maximumNumberOfTouchesForScrolling(148行目)、scrollGestureForRelationships、refreshControllerを宣言。NSRefreshController.hはクラスを宣言。NSPanGestureRecognizer.hはminimumNumberOfTouchesとmaximumNumberOfTouchesを宣言し、numberOfTouchesRequiredを非推奨として置き換え先をminimumNumberOfTouchesとしています。NSGestureRecognizer.hはcancellableByScrollGestureを宣言。NSTextSelectionManager.hはクラスとそのModeを宣言し、「provides a centralized way to manage text selection interactions using a set of gesture recognizers」というコメントがあります。NSView.hはbeginDraggingSession(items:gesture:source:)を宣言。いずれもAPI_AVAILABLE(macos(27.0))です。SwiftUICore.swiftmodule/arm64e-apple-macos.swiftinterfaceは25274行目で@available(anyAppleOS 27.0, *)のもとにGestureInputKindsを宣言しています。それを再エクスポートするSwiftUIのインターフェースは、onTapGesture、onLongPressGesture(22962行目)、そしてSpatialTapGesture、LongPressGesture、DragGesture、MagnifyGesture、RotateGestureの各イニシャライザにinputKinds:パラメータを宣言しています。TapGesture.init(count:inputKinds:)はSwiftUICoreのインターフェース(18305行目)にあります。DirectTouchSystemGesturesは、そのSDKにも、Xcode 27.2ベータ(27B5019j)内のMacOSX27.2.sdkにも、AppKitのヘッダ、SwiftUIやSwiftUICoreのmacOS Swiftインターフェース、Mac CatalystのUIKitヘッダのどこにも現れません。 ↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩ -
Apple Developer Documentation、ActivityKit、2026年10月28日に取得。概要「Share live updates from your app as Live Activities on iPhone, iPad, Apple Watch, and the Mac」、Overview「On Mac, it appears in the Menu bar」、プラットフォームはiOS、iPadOS、Mac Catalyst 16.1。
Activity、ActivityAttributes、ActivityContent(iOSとiPadOSの16.1または16.2)、WidgetKitのActivityConfigurationとDynamicIsland(iOSとiPadOSの16.1)、NSSupportsLiveActivities(iOSとiPadOSの16.1)は、いずれもmacOSを挙げていません。Displaying live data with Live Activities、概要:「Display up-to-date data and offer quick interactions in the Dynamic Island, on the Lock Screen, in CarPlay, and on a paired Mac or Apple Watch.」。SDKの確認(筆者による分析):MacOSX27.2.sdk(Xcode 27.2ベータ、27B5019j)内のActivityKit.swiftmodule/arm64e-apple-macos.swiftinterfaceは、ActivityAttributes、Activity、すべてのrequestオーバーロード、updateに@available(macOS, unavailable)を付けています。MacOSX27.0.sdk(Xcode 27.1、27A9275)内のarm64e-apple-macos.swiftinterfaceにも同じ印があります。 ↩↩↩↩↩↩↩ -
Apple、MacBook Pro with PROLED XDR Display Technical Specifications、2026年10月28日午前11時57分(PT)に取得。「14.2-inch (diagonal) tandem OLED display」で「3024-by-1986 native resolution at 254 pixels per inch」、「16.3-inch (diagonal) tandem OLED display」で「3472-by-2266 native resolution at 254 pixels per inch」。Displayの項目「Touch」「Multi-Touch gesture support」「Dynamic Island」、そして「ProMotion technology with adaptive refresh rates from 10Hz to 120Hz」。 ↩↩
-
Apple Developer、Human Interface Guidelines、Gestures(変更履歴「September 9, 2024」)、Pointing devices(「June 21, 2023」)、Designing for macOS、Live Activities(「October 13, 2026 | Added guidance for limited width layouts, and updated supported platforms and specifications.」)。いずれも2026年10月28日に取得。どのページもMacのディスプレイでのタッチに触れていません。Live Activities、Platform considerations、macOS:「Active Live Activities automatically appear in the Menu bar of a paired Mac using the compact, minimal, and expanded presentations」「Clicking the Live Activity launches iPhone Mirroring to display your app」、そして見出し「macOS dimensions」の下に「Use the provided iOS dimensions.」。 ↩↩↩
-
Apple Developer Documentation、Xcode 27.2 RC Release Notes、2026年10月28日に取得。「Xcode 27.2 RC includes Swift 6.4 and SDKs for iOS 27.2, iPadOS 27.2, tvOS 27.2, watchOS 27.2, macOS 27.2, and visionOS 27.2」。Device Hub、Resolved Issues:「Fixed: Device Hub stopped sending touch and button input to a connected device after a period of inactivity. (182695157) (FB23873443).」。Known Issues:「macOS, watchOS, tvOS, and visionOS SDKs in Xcode 27.2 incorrectly report 27.1 as a valid deployment target. Builds and other functionality might have unexpected behavior if this deployment target is used. Mac Catalyst builds with a 27.1 or 27.2 deployment target might be unable to use newly introduced API.」。macOS 27.2 Golden Gate Release Notes、同じ日に取得:タッチ、ジェスチャ、Sidecar、Live Activitiesに触れた項目はありません。Apple Developer、Releases、RSSフィードを2026年10月28日に取得:「Xcode 27.2 RC (27B48)」は Mon, 19 Oct 2026 10:00:00 PDT 付け、「macOS 27.2 (26B123)」は Mon, 26 Oct 2026 10:00:00 PDT 付けで、macOS 27.3やXcode 27.3の名前を挙げる項目はありません。 ↩↩↩↩↩↩