ORKPasscodeViewController Class Reference

Inherits from UINavigationController
Declared in ORKPasscodeViewController.h

An ORKPasscodeStepViewController object is the view controller for an ORKPasscodeStep object.

A passcode view controller can also be instantiated directly for authentication and editing by using one of the factory methods below. Each factory method requires a delegate to be implemented.

+ passcodeAuthenticationViewControllerWithText:delegate:

An authenticaiton passcode view controller allows a user to be authenticated using the passcode stored in the keychain.

+ (id)passcodeAuthenticationViewControllerWithText:(nullable NSString *)text delegate:(id<ORKPasscodeDelegate>)delegate

Parameters

text

The message displayed to the user.

delegate

The delegate for the passcode view controller.

Return Value

A passcode authentication view controller.

Discussion

A passcode must already have been created using a passcode step before presenting this view controller (see ORKPasscodeStep).

You must check to see if the passcode is stored in the keychain before presenting this view controller. A helper method, isPasscodeStoredInKeychain, is provided as part of this class.

Declared In

ORKPasscodeViewController.h

+ passcodeEditingViewControllerWithText:delegate:passcodeType:

An editing passcode view controller allows a user to be authenticated using the passcode stored in the keychain and create a new passcode.

+ (id)passcodeEditingViewControllerWithText:(nullable NSString *)text delegate:(id<ORKPasscodeDelegate>)delegate passcodeType:(ORKPasscodeType)passcodeType

Parameters

text

The message displayed to the user.

delegate

The delegate for the passcode view controller.

passcodeType

The passcode type for the new passcode.

Return Value

A passcode editing view controller.

Discussion

A passcode must already have been created using a passcode step before presenting this view controller (see ORKPasscodeStep).

You must check to see if the passcode is stored in the keychain before presenting this view controller. A helper method, isPasscodeStoredInKeychain, is provided as part of this class.

Declared In

ORKPasscodeViewController.h

+ isPasscodeStoredInKeychain

Returns ‘YES’ if a passcode is stored in the keychain, otherwise ‘NO’.

+ (BOOL)isPasscodeStoredInKeychain

Declared In

ORKPasscodeViewController.h

+ removePasscodeFromKeychain

Returns ‘YES’ if passcode was successfully removed from the keychain, otherwise ‘NO’.

+ (BOOL)removePasscodeFromKeychain

Declared In

ORKPasscodeViewController.h