Recently, Apple launched the new iphone, my side of the two local tyrants that is the first time to buy, that force lattice suddenly lifted several stalls, I wait for small yards farmers can only be helpless to Iphonex adaptation and enable FaceId application to the project.
Yesterday a product found me, gave me a iphonex, hands trembling, a thunder in the ear burst, today before work Iphonex adaptation and face unlock need to fix, tomorrow mobile I will not bring, to the adult daughter-in-law sent (--!), in the heart 10,000 small white rabbit Pentium and past . . . . (Omit 10,000 words).
Not much nonsense. Direct loading, Iphonex adaptation is not particularly cumbersome, fast adaptation Iphonex solution is in launchimage add a 1125 * 2436 picture, and in the picture of the Contents.json file will " Minimum-system-version ":" 11.0 "on it, then need small partners according to the specific control of the offset to fine-tuning, online posts quite a lot of not detailed introduction.
Face ID (FaceID):
Because of the time is more urgent, the younger brother began all kinds of Baidu, Google, but about FaceId posts or relatively few, most of them are about my Big Apple faceid abuse, recognition efficiency, wife no longer need to press the husband hand, directly according to face and so on. Do not see what can be directly CVR (COMMAND + C, COMMAND + v,command + R) code, hey ... Also blame younger brother English is not good, not what standard, only will CVR ... So can only self-absorbed dry, the process is difficult, but the result is happy content as follows:
#import <LocalAuthentication/LocalAuthentication.h>
Localauthentication of the imported system
Check if the system supports FaceId:
Lacontext *context = [[Lacontext alloc]init];
Nserror *error = nil;
if ([Context Canevaluatepolicy:lapolicydeviceownerauthenticationwithbiometrics Error:&error])
Verify that FaceId is passed
-(void) EvaluatePolicy: (lapolicy) Policy
Localizedreason: (NSString *) Localizedreason
Reply: (void (^) (BOOL success, Nserror * __nullable error)) reply;
Callback Success: Success
Callback: Error: Failed
Error.code:1.laerrorauthenticationfailed Authentication failed
2.LAErrorUserCancel user clicks Cancel on authentication
3.LAErrorUserFallback user clicks Enter password to cancel fingerprint verification
4.LAErrorSystemCancel authentication is canceled by the system (press the Home button or the Power key)
5.LAErrorTouchIDNotEnrolled User not entering fingerprint
6.LAErrorPasscodeNotSet device does not have a password set
7.LAErrorTouchIDNotAvailable the device is set to FaceId
8.LAErrorTouchIDLockout five consecutive password errors, FaceId is locked.
9.LAErrorAppCancel user cannot control the app is suspended
Well, by verifying whether the support, as well as the adjustment of the verification can be completed FaceId certification, simple and rude, I wish the small partners also early use.