Skip Navigation
Type MethodMethod

symbolPathComponents(ofIdentifier:)

Returns the path of a symbol below the documentation root, from its reference.

static func symbolPathComponents(ofIdentifier identifier: String) -> [String]?

Parameters

identifier

The reference identifier, such as doc://Bundle/documentation/Module/Type/member.

Return Value

The components after the documentation root, such as ["Module", "Type", "member"], or nil if the identifier has no such path.

Discussion

DocC writes a symbol link it cannot resolve as code showing the link’s text, such as Module/Symbol; this is the equivalent text for a resolved symbol whose page is not available.