iOS Custom Keyboard Support

by
4 views e28d268c...

Description

Check if an iOS app supports the use of custom third-party keyboards.

How to Use

Download the script and run it with Frida CLI:

Download Script

Then run with Frida:

frida -U -f YOUR_PACKAGE_NAME -l ios-custom-keyboard-support.js

Replace YOUR_PACKAGE_NAME with the target app's package name.

Source Code

JavaScript
function areThirdPartyKeyboardsAllowed() {
    var UIApplication = ObjC.classes.UIApplication.sharedApplication();
    var shouldAllowKeyboardExtension = true;
    var isDelegateImplemented = false;
    try {
        shouldAllowKeyboardExtension = UIApplication.delegate().application_shouldAllowExtensionPointIdentifier_(UIApplication, "com.apple.keyboard-service");
        isDelegateImplemented = true;
        console.log("App delegate implements application:shouldAllowExtensionPointIdentifier:");
    } catch (e) {
        if (e instanceof TypeError) {
            console.log("App delegate has no application:shouldAllowExtensionPointIdentifier:, default behaviour applies:");
        }
    }

    if (shouldAllowKeyboardExtension) {
        console.log("-> Third-party keyboards are allowed.")
    } else {
        console.log("-> Third-party keyboards are NOT allowed.")
    }

    if (shouldAllowKeyboardExtension && isDelegateImplemented) {
        console.log("\nNote: App delegate is implemented but is configured to allow third-party keyboards.");
        console.log("      Review the implementation to check if third-party keyboard support is configurable.");
    }
}
Share this script:
Twitter LinkedIn

Comments

Login or Sign up to leave a comment.
Loading comments...