macOS Look Up 弹窗逆向:LookupViewService 的查询链路
从 XPC View Service、DictionaryServices、Parsec 和结果聚合链路,梳理 macOS Look Up 弹窗的内部执行路径与可用 Hook 入口。
sequenceDiagram
participant App as Host App
participant Service as LookupViewService
participant Dict as LVSDictionaryQuery
participant Parsec as LVSParsecSession
participant Host as Host Query Path
participant UI as Result Navigator
App->>Service: configureWithQuery(term, context, domain, hostId)
App->>Service: startQuery()
Service->>Service: normalize term and trigger metadata
par Local dictionary
Service->>Dict: startLVSDictionaryQueryWithId(queryId)
Dict->>Dict: run DictionaryServices search
Dict-->>Service: dictionary results
and Parsec or Spotlight
Service->>Parsec: parsecAvailableWithCompletion()
Service->>Parsec: startQuery(queryContext, domain, queryId)
Parsec-->>Service: remote cards
and Host results
Service->>Host: startHostQueryWithId(queryId)
Host-->>Service: custom host results
end
Service->>Service: addResults / addSections
Service->>Service: resultsRanked()
Service->>UI: showResults()