Backends

public enum Backends

A namespace to which Backends are added as nested types.

  • The internal backend.

    This backend uses Objective-C runtime functions (“swizzling”) to apply method hooks.

    Warning

    This backend does not support function hooking.
    See more

    Declaration

    Swift

    public struct Internal : DefaultBackend
  • A backend which utilizes CydiaSubstrate APIs for hooking.

    This backend can hook most functions and methods. Therefore if the target system has CydiaSubstrate – or another hooking framework which vends its API – installed, this backend makes for a sensible default choice.

    Warning

    Do not use this backend if the target system does not have a framework which vends the CydiaSubstrate APIs. Doing so will result in the process crashing with an “undefined symbols” error.
    See more

    Declaration

    Swift

    public struct Substrate : DefaultBackend
  • A backend which uses Fishhook to hook functions.

    Other hook requests are forwarded to the UnderlyingBackend. This backend conditionally conforms to DefaultBackend iff UnderlyingBackend does as well.

    Warning

    This backend does not support hooking functions by their address. It is also subject to the pitfalls of Fishhook, for example calls to hooked functions from within the image in which the function is declared may still use the original implementation. In addition, all instances of symbols with the same name as the target function are hooked, not just the one in the requested image.
    See more

    Declaration

    Swift

    public struct Fishhook<UnderlyingBackend> : Backend where UnderlyingBackend : Backend
    extension Backends.Fishhook: DefaultBackend where UnderlyingBackend: DefaultBackend