PageSourceSearch

https://meshtastic-bice.vercel.app/assets/js/689444ea.1ed6cdee.js

js meshtastic-bice.vercel.app collected 2026-10-03 07:19:30 UTC 6,973 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkmeshtastic=self.webpackChunkmeshtastic||[]).push([["15897"],{32394(e,t,n){n.r(t),n.d(t,{metadata:()=>s,default:()=>h,frontMatter:()=>i,contentTitle:()=>d,toc:()=>c,assets:()=>l});var s=JSON.parse('{"id":"software/apple/developer/carplay","title":"CarPlay","description":"This page covers the implementation of the CarPlay feature. For the user-facing guide see CarPlay.","source":"@site/docs/software/apple/developer/carplay.md","sourceDirName":"software/apple/developer","slug":"/software/apple/developer/carplay","permalink":"/docs/software/apple/developer/carplay","draft":false,"unlisted":false,"editUrl":"https://github.com/meshtastic/meshtastic/edit/master/docs/software/apple/developer/carplay.md","tags":[],"version":"current","lastUpdatedBy":"rcarteraz","sidebarPosition":9,"frontMatter":{"title":"CarPlay","parent":"Developer Guide","sidebar_position":9},"sidebar":"Sidebar","previous":{"title":"Deep Links","permalink":"/docs/software/apple/developer/deep-links"},"next":{"title":"TAK Protocol","permalink":"/docs/software/apple/developer/tak-protocol"}}'),r=n(91987),a=n(67008);let i={title:"CarPlay",parent:"Developer Guide",sidebar_position:9},d="CarPlay Architecture",l={},c=[{value:"Components",id:"components",level:2},{value:"Template Updates",id:"template-updates",level:2},{value:"Intent Donation De-duplication",id:"intent-donation-de-duplication",level:2},{value:"Adding a New Intent",id:"adding-a-new-intent",level:2}];function o(e){let t={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"carplay-architecture",children:"CarPlay Architecture"})}),"\n",(0,r.jsxs)(t.p,{children:["This page covers the implementation of the CarPlay feature. For the user-facing guide see ",(0,r.jsx)(t.a,{href:"/docs/software/apple/user/carplay",children:"CarPlay"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"components",children:"Components"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Component"}),(0,r.jsx)(t.th,{children:"File"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"CarPlaySceneDelegate"})}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"Meshtastic/CarPlay/CarPlaySceneDelegate.swift"})}),(0,r.jsxs)(t.td,{children:[(0,r.jsx)(t.code,{children:"CPTemplateApplicationSceneDelegate"})," that builds and manages the two-tab UI"]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"CarPlayIntentDonation"})}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"Meshtastic/CarPlay/CarPlayIntentDonation.swift"})}),(0,r.jsxs)(t.td,{children:["Donates incoming and outgoing ",(0,r.jsx)(t.code,{children:"INSendMessageIntent"})," interactions so conversations appear in CarPlay Messages and Siri can read them aloud"]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"SendMessageIntentHandler"})}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"Meshtastic/Intents/SendMessageIntentHandler.swift"})}),(0,r.jsxs)(t.td,{children:["Handles ",(0,r.jsx)(t.code,{children:"INSendMessageIntent"})," \u2014 resolves recipients/channels and sends the message over the active transport"]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"SearchForMessagesIntentHandler"})}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"Meshtastic/Intents/SearchForMessagesIntentHandler.swift"})}),(0,r.jsxs)(t.td,{children:["Handles ",(0,r.jsx)(t.code,{children:"INSearchForMessagesIntent"})]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"SetMessageAttributeIntentHandler"})}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"Meshtastic/Intents/SetMessageAttributeIntentHandler.swift"})}),(0,r.jsxs)(t.td,{children:["Handles ",(0,r.jsx)(t.code,{children:"INSetMessageAttributeIntent"})," (mark as read)"]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"IntentHandler"})}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"Meshtastic/Intents/IntentHandler.swift"})}),(0,r.jsxs)(t.td,{children:["Routes ",(0,r.jsx)(t.code,{children:"INIntent"}),"s to the appropriate handler"]})]})]})]}),"\n",(0,r.jsx)(t.h2,{id:"template-updates",children:"Template Updates"}),"\n",(0,r.jsxs)(t.p,{children:["The scene delegate subscribes to ",(0,r.jsx)(t.code,{children:"AccessoryManager.shared.$isConnected"})," with a ",(0,r.jsx)(t.strong,{children:"300 ms debounce"})," and calls ",(0,r.jsx)(t.code,{children:"updateSections(_:)"})," on existing ",(0,r.jsx)(t.code,{children:"CPListTemplate"})," instances rather than rebuilding the whole template tree. This minimises flicker during reconnects and avoids triggering CarPlay's rate-limit on template replacement."]}),"\n",(0,r.jsx)(t.h2,{id:"intent-donation-de-duplication",children:"Intent Donation De-duplication"}),"\n",(0,r.jsxs)(t.p,{children:["Intent donations are de-duplicated per C
1arPlay session using an in-memory ",(0,r.jsx)(t.code,{children:"Set"}),". This avoids repeated IPC calls to the intents daemon on every list refresh (which happens on a timer while CarPlay is connected)."]}),"\n",(0,r.jsx)(t.p,{children:"When a new CarPlay session starts, the set is cleared and up to 50 unread messages are batch-donated so Siri can read them back on demand."}),"\n",(0,r.jsx)(t.h2,{id:"adding-a-new-intent",children:"Adding a New Intent"}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["Create a handler in ",(0,r.jsx)(t.code,{children:"Meshtastic/Intents/"})," conforming to the appropriate ",(0,r.jsx)(t.code,{children:"INIntent"})," protocol."]}),"\n",(0,r.jsxs)(t.li,{children:["Register the handler in ",(0,r.jsx)(t.code,{children:"IntentHandler.swift"}),"'s ",(0,r.jsx)(t.code,{children:"handler(for:)"})," switch."]}),"\n",(0,r.jsxs)(t.li,{children:["Declare the intent in ",(0,r.jsx)(t.code,{children:"Meshtastic.entitlements"})," under ",(0,r.jsx)(t.code,{children:"com.apple.developer.siri"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Add a usage description in ",(0,r.jsx)(t.code,{children:"Info.plist"})," if the intent requires a new privacy permission."]}),"\n"]})]})}function h(e={}){let{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(o,{...e})}):o(e)}},67008(e,t,n){n.d(t,{R:()=>i,x:()=>d});var s=n(71763);let r={},a=s.createContext(r);function i(e){let t=s.useContext(a);return s.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),s.createElement(a.Provider,{value:t},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.