frida / frida-swift-bridge

Frida's finally getting Swifty
Apache License 2.0
126 stars 15 forks source link

$methods array is empty when source code has methods #19

Open erosthorne1 opened 4 months ago

erosthorne1 commented 4 months ago

Hello there, i'm playing around with frida-swift-bridge trying to call swift methods.

As an example with the following source code:


class URL {

    init?(urlString: String) {
        guard let query = URLComponents(string: urlString)?.queryItems else {
            return nil
        }
    }

    private static func decode(_ secret: String?) -> String? {
        return secret
    }
}

But when I try to list the methods I get and empty methods list:

[iPhone::test ]-> Swift.modules.test.classes.URL
{
    "$conformances": [],
    "$fields": [],
    "$methods": []
}

How could I initialize a URL with a string in Frida? How could I call the decode method on the class instance after?