Contents

disabled

A shared signposter that doesn’t emit signposts at runtime.

Declaration

static var disabled: OSSignposter { get }

Discussion

You can use the signposter this property returns to disable signposts in your production builds without having to refactor your code, as the following example demonstrates:

let signposter: OSSignposter
#if DEBUG
signposter = OSSignposter()
#else
signposter = OSSignposter.disabled
#endif

To determine if a signposter can emit signposts, use the isEnabled property.

See Also

Creating a Signposter