Disable TouchID on a jailbroken iOS device

653 views Asked by At

I'm trying to temporarily disable TouchID authentication so the phone won't unblock even if the finger matches. How can I do that? Is there a way to update the switch in Settings programatically, like I do with vibration, through com.apple.springboard.plist?

1

There are 1 answers

2
Nat On

Easiest method to check if device is jailbroken is to check canOpenURL (eg. cydia, mobileCydia URLs). You can also try to write to reserved paths (eg ~/private). There are also methods connected with fork() and running processes, you can read about it on reverse engineering blogs.

You should check it before running something like code below:

if context.canEvaluatePolicy(LAPolicy.DeviceOwnerAuthenticationWithBiometrics, error: &error) {}

--- edit ---

To answer you question in comment (as far as I understood the question):

- (void)performTouchIdLogin {
    LAContext *context = [[LAContext alloc] init];
    LAPolicy policy = LAPolicyDeviceOwnerAuthenticationWithBiometrics;
    NSError *error = nil;

    BOOL isJailbroken = ([[NSFileManager defaultManager] fileExistsAtPath: @"/bin/bash"]); // TODO: handle simulator
    BOOL canUseTouchID = ([context canEvaluatePolicy:policy error:&error]);

    if (!isJailbroken && canUseTouchID) {
        [context evaluatePolicy:policy localizedReason:@"Please log in using TouchID" reply:^(BOOL success, NSError *error) {
            // do something
        }];
    };
}