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
:
- passcodeControllerDelegate: An implementation of
FUIPasscodeControllerDelegate
that handles events from this controller for bothFUIPasscodeInputController
andFUIPasscodeCreateController
. - validationDelegate: An implementation of
FUIPasscodeValidationDelegate
that validates the passcode entered by the user.
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, functionshouldTryPasscode
of theFUIPasscodeControllerDelegate
implementation is invoked. The application should not dismiss the controller in theshouldTryPasscode
implementation.The second screen prompts the user to enter a new passcode, which is validated by the
FUIPasscodePolicy
. TheFUIPasscodeControllerDelegate
provided functionvalidate
ofvalidationDelegate
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 theFUIPasscodeControllerDelegate
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 theFUIPasscodeChangeController
storyboard in theSAPFiori
framework bundle. The app developer must provide the required properties in theUIController
’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)
}
-
An implementation of
FUIPasscodeControllerDelegate
passedFUIPasscodeInputController
andFUIPasscodeCreateController
.Declaration
Swift
public weak var passcodeControllerDelegate: FUIPasscodeControllerDelegate?
-
An implementaiton of
FUIPasscodeValidationDelegate
passed toFUIPasscodeCreateController
for additional passcode validations during passcode create/changeDeclaration
Swift
public weak var validationDelegate: FUIPasscodeValidationDelegate?
-
Creates a
FUIPasscodeChangeController
object from storyboard. - returns: AFUIPasscodeChangeController
object.Declaration
Swift
public class func createInstanceFromStoryboard() -> FUIPasscodeChangeController?
Return Value
A
FUIPasscodeChangeController
object.