If you have used LookInside to inspect a SwiftUI view hierarchy, you have probably seen a type name that looks like this:
CGDrawingView in _863CCF9D49B535DAEB1C7D61BEE53B59The long hex string is a Swift private discriminator hash. Here is where it comes from and what LookInside does with it.
Where the hash comes from
Swift allows multiple types to have the same base name as long as they live in different files. To keep them distinct in the binary, the compiler generates a private discriminator — a hash derived from the module name and the source filename — and appends it to the mangled type name when the type is private.
SwiftUI and SwiftUICore use this extensively. Most of the internal view types you see in the inspector are private, so their names carry hashes instead of readable filenames.
Why the inspector can't resolve it automatically
The hash is a one-way function of module name plus filename. The runtime does not store the original inputs — it only stores the hash. To reverse it you need the source code, or at minimum a precomputed table that maps hashes back to filenames.
Lookin did not attempt to resolve these hashes, so the raw hex string was the only information users got. That is useful for identifying a type, but it tells you nothing about where it lives.
How LookInside resolves them
LookInside can download precomputed CSV indexes for SwiftUI and SwiftUICore from its Private Discriminator settings. When you select a view whose type carries a hash, LookInside looks up the hash in these local tables and shows the module name and filename alongside the original mangled name. The CGDrawingView in _863CCF9D... example above resolves to SwiftUICore / CALayerPlatformViewDefinition.swift.
For your own app code, LookInside can build a CSV index from a local Swift source folder. You point it at the module root, LookInside walks the source files, computes the hashes, and saves the resulting table under Application Support. No files leave your machine.
The swift-pd-guess fallback
When no precomputed table covers a hash — for example, a private type in a closed-source framework — LookInside can attempt a guess using a companion tool called swift-pd-guess. This runs a heuristic search against known module and filename patterns. If the result looks plausible you can verify it and save it locally so future sessions skip the guess step.
Why local matters
The decision to keep everything local was deliberate. Source folders can contain proprietary code. Sending source paths or file contents to a server to resolve a hash would be an unacceptable tradeoff, especially for developers working on commercial or enterprise codebases. Local indexes mean the resolution is fast, works offline, and keeps your source where it belongs.
The setup walkthrough is in the Private Discriminator documentation.