Tweak

public protocol Tweak

A type representing an Orion tweak.

A module should contain zero or one types conforming to this protocol. If there are zero, Orion will use DefaultTweak.

Tweaks will default to the backend specified via the Orion CLI. In order to override the backend programmatically, conform to TweakWithBackend instead.

  • The tweak’s initializer and entry point.

    Use this method to perform any custom initialization behavior.

    Warning

    This method is called at launch time, even before main has been invoked. Do not synchronously perform any time-consuming tasks here, because they will make the target process launch slowly.

    Declaration

    Swift

    init()
  • tweakDidActivate() Default implementation

    Called after all of the tweak’s hooks have been activated. The default implementation does nothing.

    Default Implementation

    Declaration

    Swift

    func tweakDidActivate()