AppEnvironment

public struct AppEnvironment

AppEnvironment is a handy utility for determining the environment that the library is being run from. Beyond providing Scyther functionality, clients implementing Scyther may also find it useful.

  • Indicates whether the appStoreReceiptURL at Bundle.main.appStoreReceiptURL is a sandbox receipt.

    Declaration

    Swift

    public static let isTestFlight: Bool
  • Returns a Bool value indicating whether or not #if DEBUG is true for the current build.

    Declaration

    Swift

    public static var isDebug: Bool { get }
  • Returns a Bool value indicating whether or not the current build is being run via the iOS Simulator.

    Declaration

    Swift

    public static var isSimulator: Bool { get }
  • Returns a Bool value indicating whether or not the current build is being run via XCode or TestFlight.

    Declaration

    Swift

    public static var isDevelopment: Bool { get }
  • Returns a Bool value indicating whether or not the current build is being run via an App Store installation.

    Declaration

    Swift

    public static var isAppStore: Bool { get }
  • Returns a BuildType value representing the current build environment.

    Declaration

    Swift

    public static func configuration(testValue: BuildType? = nil) -> BuildType
  • Returns a Bool value indicating whether or not the current device is jailbroken by determining whether or not Cydia or Sileo is installed. It also checks for multiple other red flags that would indicate root/ssh access on the device. These checks will not apply if the device is a simulator.

    Declaration

    Swift

    public static var isJailbroken: Bool { get }