ClarityDeveloperAlerts

struct ClarityDeveloperAlerts

A struct that is used to store constants that determine the status of print statement alerts for the use by Clarity developers.

The struct contains a single method that prints alerts depending on the status.

  • A static Bool that signifies whether to enable the printing of certain internal Swift print statements to the console.

    These calls produce logs that are intended for the consumption by a Clarity framework developer only and should be disabled before the framework is built for release.

    Declaration

    Swift

    static let isClarityDeveloperInternalPrinting: Bool
  • A static Bool that signifies whether to enable the printing of internal Swift print statements to the console within the algorithm in goForPrintFromSettings(_:_:_:functionNumber:_:_:).

    These calls produce logs that are intended for the consumption by a Clarity framework developer only and should be disabled before the framework is built for release.

    Declaration

    Swift

    static let isClarityDeveloperInternalPrintingGONOGO: Bool
  • A static Bool that signifies whether to suppress the printing of duplicate print number public alerts.

    This property is intended as a convenience for use during unit testing. Duplicate print numbers are included in the internal JSON files and their detection is tested. The side effect of the tests is the printing of alerts intended for client applications. Enabling this Bool allows a developer to prevent the alerts from being printed so that the console is kept clear for other tests. It should be disabled before the framework is built for release.

    Declaration

    Swift

    static let isClarityDeveloperSuppressDuplicateWarnings: Bool
  • A static method that is called during initialisation that verifies that the internal developer convenience Bool properties are all set to false. The method will only be called if Clarity is embedded in a client application and the client application print mode is set to true.

    If any of the properties are set to true an alert is printed to the console as a reminder to switch them to false before the framework is built for release.

    The method is predicated on Clarity being tested while embedded in a dummy client application.

    Declaration

    Swift

    static func verifyReleaseCompatibleSettingsStateForClarityFrameworkDeveloper()