I'm using this code:
If i compile i get this error:
what is missing?
iOS - TouchID
Hi All, This code will allow to use the TouchID (Fingerprint) in your app. The example is on a button named Button with click event. I was thinking to build a class for this but I think this is more comfortable to copy the source and modify the subs. #PlistExtra: NSFaceIDUsageDescription
www.b4x.com
B4X:
#If OBJC
#import <LocalAuthentication/LocalAuthentication.h>
-(void)TouchID :(NSObject*)handler :(NSString*) subnameok :(NSString*) subnamefail
{
LAContext *myContext = [[LAContext alloc] init];
NSError *authError = nil;
NSString *myLocalizedReasonString = @"Used for quick and secure access to the test app";
if ([myContext canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&authError]) {
[myContext evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics
localizedReason:myLocalizedReasonString
reply:^(BOOL success, NSError *error) {
if (success) {
[self.__c CallSubDelayed:self.bi :handler :(subnameok)];
} else {
[self.__c CallSubDelayed2:self.bi :handler :(subnamefail) :(error.localizedDescription)];
}
}];
} else {
[self.__c CallSubDelayed2:self.bi :handler :(subnamefail) :(authError.localizedDescription)];
}
}
#End If
B4X:
/Users/alexanderstolte/Dropbox/XXX/B4iBuildServer/UploadedProjects/<user id>/B4iProject/b4i_main.m:245:23: error: property '__c' not found on object of type 'B4IViewController *'
[self.__c CallSubDelayed:self.bi :handler :(subnameok)];
^
/Users/alexanderstolte/Dropbox/XXX/B4iBuildServer/UploadedProjects/<user id>/B4iProject/b4i_main.m:247:23: error: property '__c' not found on object of type 'B4IViewController *'
[self.__c CallSubDelayed2:self.bi :handler :(subnamefail) :(error.localizedDescription)];
^
/Users/alexanderstolte/Dropbox/XXX/B4iBuildServer/UploadedProjects/<user id>/B4iProject/b4i_main.m:251:7: error: property '__c' not found on object of type 'B4IViewController *'
[self.__c CallSubDelayed2:self.bi :handler :(subnamefail) :(authError.localizedDescription)];
what is missing?