Callbacks on iOS

Methods

ShieldCallback Methods
Method Description
jailbreakStatus

This method is called when App Shielding has determined whether the device which the app runs is jailbroken. This means the system security posture of the device has been compromised by modifying the operating system in some way. Different jailbreaks employ different methods to bypass security checks, like codesigning, which in turn makes repackaging or the addition of hooking frameworks or library injection possible.

The parameter passed to this method indicates if the device is jailbroken.

repackagingStatus

This method is called when App Shielding has checked whether the host application was repackaged. The parameter passed to this method indicates whether or not the application was repackaged.

Possible values passed to this method:

  • 0. The application was not repackaged.
  • 1. The application was repackaged.

This method is not called if the application runs in an emulator.

debuggerStatus

This method is called when App Shielding has determined whether a debugger is attached to the host application. App Shielding should be configured to terminate the application as soon as a debugger is detected instead of using this callback.

The value passed to this method indicates if a debugger is attached.

Possible values passed to this method:

  • 0. No debugger is attached.
  • 1. A debugger is attached.
screenshotDetected

This method is called when App Shielding detects that a screenshot has been taken of the application.

This method is not called if the application is run in an emulator, since screenshots are handled differently in this case.

libraryInjectionPrevented

This method is called when App Shielding has prevented an untrusted library from being injected into the process during runtime.

libraryInjectionDetected

This method is called when App Shielding has detected that there are untrusted libraries in the process.

If code has been injected into the process, App Shielding should exit the application immediately.

hookingFrameworksDetected

This method is called when App Shielding has detected that there are hooking frameworks in the process.

If hooking frameworks are found in the process, App Shielding should exit the application immediately.

screenRecordStatusChanged

This method is called when App Shielding has determined whether a screen that the application is using is being recorded or not.

If the value passed to this method is true, one or more screens are being recorded. If the value is false, none of them are being recorded.

developerModeStatus

This method is called when App Shielding has determined whether Developer Mode is available and enabled on the device. The callback returns an enum, ShieldDeveloperModeStatus, with three possible states:

  • Disabled
  • Enabled
  • NotAvailable