add security validation to your app
1. import Header File
#import <LocalAuthentication/LocalAuthentication.h>
2. Add Phone password verification
//Create a security validation objectLacontext *con =[[Lacontext alloc] init]; Nserror*error; //Determine if password validation is supported /** * lapolicydeviceownerauthentication mobile phone password Verification positive way * lapolicydeviceownerauthenticationwithbiometrics fingerprint verification method */BOOL can= [Con canevaluatepolicy:lapolicydeviceownerauthenticationwithbiometrics error:&ERROR]; if(CAN) {[Con evaluatepolicy:lapolicydeviceownerauthenticationwithbiometrics localizedreason:@"Verification Information"reply:^ (BOOL success, Nserror *_nullable Error) {NSLog (@"%d,%@", Success,error); }]; }
You can use success in the callback to determine whether the validation was successful, and then do some other things
IOS Add phone password, fingerprint for secure authentication