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.
+ (instancetype)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.
+ (instancetype)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
+ forcePasscode:withTouchIdEnabled:
This method allows to force the passcode to be a certain value. You only want to use this capability when you’re moving your existing users from a custom passcode entry mechanism to the one provided by ResearchKit.
+ (void)forcePasscode:(NSString *)passcode withTouchIdEnabled:(BOOL)touchIdEnabled
Parameters
passcode |
The passcode to store |
---|---|
touchIdEnabled |
Whether TouchId will be available during passcode entry |
Discussion
This method will raise an exception if passcode
is nil.
Declared In
ORKPasscodeViewController.h