FUIPasscodeChangeController

public class FUIPasscodeChangeController: UINavigationController

Use this UINavigationController to change the passcode screen flows in the application.

Set up the following properties before presenting this FUIPasscodeChangeController:

Here is the screen flow:

  • The first screen prompts the user to enter the current passcode using FUIPasscodeInputController. This controller always uses the passcode for authentication only. Note: Even if touchID is enabled, the controller does not use touchID for authentication. After a passcode is entered, function shouldTryPasscode of the FUIPasscodeControllerDelegate implementation is invoked. The application should not dismiss the controller in the shouldTryPasscode implementation.

  • The second screen prompts the user to enter a new passcode, which is validated by the FUIPasscodePolicy. The FUIPasscodeControllerDelegate provided function validate of validationDelegate is invoked for additional validation. Upon validation success, the next screen displays.

  • The third screen prompts the user to enter the passcode again to verify the passcode entered in the second screen. After the setup is complete, the function shouldTryPasscode of the FUIPasscodeControllerDelegate is invoked. The delegate should either create a secure store with the passcode, or save the passcode in a secure manner. Note: Changing the passcode does not affect the existing Touch ID preferences. No additional screens display to enable touchID to change the passcode flow. If touchID was previously disabled before triggering the passcode change, touchID remains disabled. However, if touchID was previously enabled, the internal touchID-related data is automatically updated after the passcode is changed.

This passcode flow change is implemented in FUIPasscodeChangeController.storyboard. There are two ways to invoke it:

  • Use another storyboard and add a Present Modally segue to the FUIPasscodeChangeController storyboard in the SAPFiori framework bundle. The app developer must provide the required properties in the UIController’s prepare for segue function:

override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
   let changeController = segue.destination as! FUIPasscodeChangeController
   changeController.passcodeControllerDelegate = passcodeControllerDelegate
   changeController.validationDelegate = validationDelegate
}

  • Programmatically load it:
if let changeController = FUIPasscodeChangeController.createInstanceFromStoryboard() {
   changeController.passcodeControllerDelegate = passcodeControllerDelegate
   changeController.validationDelegate = validationDelegate
   self.present(changeController, animated: true, completion: nil)
}