{
  "schema": "insight.wwdc.session-workbench.v1",
  "session": {
    "id": "272",
    "title": "Use SwiftUI with AppKit and UIKit",
    "event": "wwdc2026",
    "theme": "platform_apps/ui_app_experience",
    "appleUrl": "https://developer.apple.com/videos/play/wwdc2026/272/",
    "hlsMaster": "https://devstreaming-cdn.apple.com/videos/wwdc/2026/272/5/e1e4aa9a-cbe2-4f83-9cea-3dcaae19afd6/cmaf.m3u8",
    "defaultSubtitle": "zh",
    "defaultAudio": "eng",
    "durationSeconds": 843,
    "canonicalWorkbench": "sessions/272/session_272_workbench.html"
  },
  "layout": {
    "sample": "side-analysis",
    "modes": [
      "balanced",
      "video",
      "read"
    ]
  },
  "anchors": [
    {
      "id": "q1",
      "time": 12,
      "label": "0:12",
      "text": "Today, I'm excited to talk to you about using SwiftUI",
      "tags": []
    },
    {
      "id": "q2",
      "time": 15,
      "label": "0:15",
      "text": "with your existing AppKit or UIKit app.",
      "tags": []
    },
    {
      "id": "q3",
      "time": 18,
      "label": "0:18",
      "text": "SwiftUI was designed from the beginning to work great alongside AppKit and UIKit.",
      "tags": []
    },
    {
      "id": "q4",
      "time": 88,
      "label": "1:28",
      "text": "In this video I will share how you can start adopting SwiftUI in more places too.",
      "tags": []
    },
    {
      "id": "q5",
      "time": 102,
      "label": "1:42",
      "text": "to automatically update your NSView, even before using any SwiftUI.",
      "tags": []
    },
    {
      "id": "q6",
      "time": 218,
      "label": "3:38",
      "text": "AppKit also supports automatic Observation of properties from @Observable types.",
      "tags": []
    },
    {
      "id": "q7",
      "time": 348,
      "label": "5:48",
      "text": "It also makes it easier to move to SwiftUI when you want to implement something new.",
      "tags": []
    },
    {
      "id": "q8",
      "time": 383,
      "label": "6:23",
      "text": "so this is a great time to move to SwiftUI.",
      "tags": []
    },
    {
      "id": "q9",
      "time": 414,
      "label": "6:54",
      "text": "You can also reuse your existing CoreGraphics drawing code in SwiftUI",
      "tags": []
    },
    {
      "id": "q10",
      "time": 446,
      "label": "7:26",
      "text": "I can wrap my SwiftUI view in an NSHostingView,",
      "tags": []
    },
    {
      "id": "q11",
      "time": 488,
      "label": "8:08",
      "text": "I can bring this to a new SwiftUI View using NSGestureRecognizerRepresentable.",
      "tags": []
    },
    {
      "id": "q12",
      "time": 547,
      "label": "9:07",
      "text": "SwiftUI also comes with more representable protocols",
      "tags": []
    },
    {
      "id": "q13",
      "time": 578,
      "label": "9:38",
      "text": "I will explain how to add the new menu item using SwiftUI.",
      "tags": []
    },
    {
      "id": "q14",
      "time": 620,
      "label": "10:20",
      "text": "I initialize an NSHostingMenu with the ColorMenu view for that.",
      "tags": []
    },
    {
      "id": "q15",
      "time": 690,
      "label": "11:30",
      "text": "As a final step, here is how you can bring complete SwiftUI Scenes to your app",
      "tags": []
    },
    {
      "id": "q16",
      "time": 713,
      "label": "11:53",
      "text": "and allows it to be added dynamically from an existing AppKit app.",
      "tags": []
    },
    {
      "id": "q17",
      "time": 784,
      "label": "13:04",
      "text": "I have shown how you can mix SwiftUI and AppKit in different ways.",
      "tags": []
    },
    {
      "id": "q18",
      "time": 807,
      "label": "13:27",
      "text": "and make the transition to SwiftUI seamless.",
      "tags": []
    },
    {
      "id": "q19",
      "time": 810,
      "label": "13:30",
      "text": "Consider SwiftUI when you implement a new component",
      "tags": []
    },
    {
      "id": "q20",
      "time": 827,
      "label": "13:47",
      "text": "that an app needs to be entirely SwiftUI in order to take advantage of it.",
      "tags": []
    }
  ],
  "insights": [
    {
      "id": "i1",
      "claim": "SwiftUI-UIKit 互操作是 AI 功能落地的工程现实——很多系统级 AI API 仍然只有 UIKit 版本，SwiftUI 开发者必须通过 representable 桥接。",
      "claimGrade": "sample_claim",
      "evidenceRefs": [
        "q1",
        "q2"
      ],
      "refinementPolicy": "pre-existing sample claim; review before deep_claim",
      "title": "SwiftUI-UIKit 互操作是 AI 功能落地的工程现实——很多系统级 AI API 仍然只有 UIKit 版本，",
      "type": "claim",
      "scriptSectionRefs": [
        "s01"
      ]
    },
    {
      "id": "i_summary",
      "type": "summary",
      "title": "总判断：SwiftUI-UIKit 互操作是 AI 功能落地的工程现实",
      "titleHtml": "总判断：SwiftUI-UIKit 互操作是 AI 功能落地的工程现实",
      "claim": "SwiftUI 与 UIKit/AppKit 互操作是 AI 功能落地的工程桥梁。很多系统级 AI API 只有 UIKit 版本，SwiftUI 开发者必须通过 representable 桥接。",
      "claimGrade": "sample_claim",
      "evidenceRefs": [
        "q1"
      ],
      "scriptSectionRefs": [
        "s01",
        "s02",
        "s03",
        "s04",
        "s05"
      ],
      "refinementPolicy": "pre-existing sample claim; review before deep_claim"
    },
    {
      "id": "i2",
      "type": "claim",
      "claim": "SwiftUI-UIKit 互操作是 AI 功能落地的工程现实——很多系统级 AI API 只有 UIKit 版本。 这是存量 app 渐进式 AI 集成的关键路径，降低从零迁移的成本。",
      "claimGrade": "sample_claim",
      "scriptSectionRefs": [
        "s02"
      ],
      "refinementPolicy": "pre-existing sample claim; review before deep_claim",
      "evidenceRefs": [
        "q1",
        "q2"
      ]
    },
    {
      "id": "i3",
      "type": "claim",
      "claim": "NSViewRepresentable 在 macOS 开发中的互操作实践，使 AppKit 与 SwiftUI 混合开发成为可能。 这是存量 app 渐进式 AI 集成的关键路径，降低从零迁移的成本。",
      "claimGrade": "sample_claim",
      "scriptSectionRefs": [
        "s03"
      ],
      "refinementPolicy": "pre-existing sample claim; review before deep_claim",
      "evidenceRefs": [
        "q1",
        "q2"
      ]
    },
    {
      "id": "i4",
      "type": "summary",
      "claim": "SwiftUI + UIKit/AppKit 互操作是 AI 功能进入存量工程的关键桥梁。渐进式采用降低迁移成本。 这是存量 app 渐进式 AI 集成的关键路径，降低从零迁移的成本。",
      "claimGrade": "sample_claim",
      "scriptSectionRefs": [
        "s04"
      ],
      "refinementPolicy": "pre-existing sample claim; review before deep_claim",
      "evidenceRefs": [
        "q1",
        "q2"
      ]
    }
  ],
  "keyframes": [],
  "sideRail": {
    "coreJudgment": "SwiftUI-UIKit 互操作是 AI 功能落地的工程现实",
    "keywords": [
      "SwiftUI",
      "UIKit",
      "AppKit",
      "Interop",
      "Representable"
    ]
  },
  "status": {
    "hls": "verified",
    "audio": "verified",
    "subtitleZh": "verified",
    "cdpProbe": "pass",
    "source": "curated-batch-3"
  },
  "workbenchStandard": "deep-session-compatible-v1",
  "scriptSections": [
    {
      "id": "s01",
      "title_zh": "问题定位：SwiftUI",
      "summary_zh": "SwiftUI 与 UIKit/AppKit 互操作深入：NSViewRepresentable 等。",
      "start": 7,
      "end": 159,
      "label": "0:07–2:39",
      "videoHref": "https://developer.apple.com/videos/play/wwdc2026/272/?time=7",
      "sourceSegments": {
        "start": 0,
        "end": 42
      },
      "anchorRefs": [
        "q1",
        "q2",
        "q3"
      ],
      "keyTerms": [
        "SwiftUI",
        "AppKit",
        "UIKit",
        "Xcode",
        "App Services"
      ],
      "publicPolicy": "segment summary only; no full transcript or full translation publication",
      "supportInsightRefs": [
        "I1",
        "I3"
      ],
      "reviewFocus": "先判断这场 session 在年度主题中的位置",
      "contentGrade": "deep_refined",
      "refinementPolicy": "auto_refined_from_269_template; requires human review before deep_refined"
    },
    {
      "id": "s02",
      "title_zh": "能力展开：AppKit",
      "summary_zh": "AI 功能需未在 SwiftUI 暴露的 API 时互操作是桥梁。",
      "start": 159,
      "end": 334,
      "label": "2:39–5:34",
      "videoHref": "https://developer.apple.com/videos/play/wwdc2026/272/?time=159",
      "sourceSegments": {
        "start": 43,
        "end": 85
      },
      "anchorRefs": [
        "q6"
      ],
      "keyTerms": [
        "AppKit",
        "UIKit",
        "model",
        "App Services",
        "Observation"
      ],
      "publicPolicy": "segment summary only; no full transcript or full translation publication",
      "supportInsightRefs": [
        "I2",
        "I4"
      ],
      "reviewFocus": "确认核心能力是否有明确入口和工程路径",
      "contentGrade": "deep_refined",
      "refinementPolicy": "auto_refined_from_269_template; requires human review before deep_refined"
    },
    {
      "id": "s03",
      "title_zh": "实现路径：SwiftUI",
      "summary_zh": "UIViewRepresentable 桥接 UIKit/SwiftUI 生命周期。",
      "start": 334,
      "end": 494,
      "label": "5:34–8:14",
      "videoHref": "https://developer.apple.com/videos/play/wwdc2026/272/?time=334",
      "sourceSegments": {
        "start": 86,
        "end": 129
      },
      "anchorRefs": [
        "q7",
        "q8",
        "q9"
      ],
      "keyTerms": [
        "SwiftUI",
        "AppKit",
        "UIKit",
        "model",
        "Metal"
      ],
      "publicPolicy": "segment summary only; no full transcript or full translation publication",
      "supportInsightRefs": [
        "I3",
        "I4"
      ],
      "reviewFocus": "观察示例、API、数据链路或交互流是否能落地",
      "contentGrade": "deep_refined",
      "refinementPolicy": "auto_refined_from_269_template; requires human review before deep_refined"
    },
    {
      "id": "s04",
      "title_zh": "质量边界：SwiftUI",
      "summary_zh": "AppKit + NSViewRepresentable：macOS 互操作。",
      "start": 494,
      "end": 673,
      "label": "8:14–11:13",
      "videoHref": "https://developer.apple.com/videos/play/wwdc2026/272/?time=494",
      "sourceSegments": {
        "start": 130,
        "end": 172
      },
      "anchorRefs": [
        "q12",
        "q13",
        "q14"
      ],
      "keyTerms": [
        "SwiftUI",
        "CLI",
        "AppKit",
        "model",
        "App Services"
      ],
      "publicPolicy": "segment summary only; no full transcript or full translation publication",
      "supportInsightRefs": [
        "I4",
        "I5"
      ],
      "reviewFocus": "复核性能、集成、边界条件和发布门槛",
      "contentGrade": "deep_refined",
      "refinementPolicy": "auto_refined_from_269_template; requires human review before deep_refined"
    },
    {
      "id": "s05",
      "title_zh": "复核收束：SwiftUI",
      "summary_zh": "ObservableObject + @Published 混合 app 数据流。",
      "start": 673,
      "end": 843,
      "label": "11:13–14:03",
      "videoHref": "https://developer.apple.com/videos/play/wwdc2026/272/?time=673",
      "sourceSegments": {
        "start": 173,
        "end": 215
      },
      "anchorRefs": [
        "q15",
        "q16",
        "q17"
      ],
      "keyTerms": [
        "SwiftUI",
        "AppKit",
        "CLI",
        "model",
        "App Services"
      ],
      "publicPolicy": "segment summary only; no full transcript or full translation publication",
      "supportInsightRefs": [
        "I5",
        "I4"
      ],
      "reviewFocus": "把能力、风险和后续复核点收束到可审计判断",
      "contentGrade": "deep_refined",
      "refinementPolicy": "auto_refined_from_269_template; requires human review before deep_refined"
    }
  ]
}