I am trying to create an instance of a class of an iOS app using Frida.
In the past I have successfully done this using a command such as:
var instance = ObjC.chooseSync(ObjC.classes.TestClass)[0];
However, in this instance, the class that I would like to create an instance of has a .
in the name so if I try the same command as above I understandably get an error:
var instance = ObjC.chooseSync(ObjC.classes.Test.Class)[0];
SyntaxError: expecting field name
I had identified the class from the output of:
Object.keys(ObjC.classes).filter(function(m){ return m.toLowerCase().includes("test") });
The output of this lists a number of classes, all of which are either mangled Swift names, or have a .
in them so I'm not sure if I simply don't understood a concept here about how Frida handles class names in a Swift and Objective-C app, or there is something I've missed in attempting to create the instance.