Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type not found: __C.NSString #16

Open
0xElessar opened this issue Jan 20, 2024 · 0 comments
Open

Type not found: __C.NSString #16

0xElessar opened this issue Jan 20, 2024 · 0 comments

Comments

@0xElessar
Copy link

Hello @hot3eed ,

sorry to bother you again. But I created extremely simple class in Swift class TestString:

    "TestString": {
        "$conformances": [],
        "$methods": [
            {
                "address": "0x102b2c908",
                "name": "TestSwift2.TestString.generateSwiftString() -> Swift.String",
                "type": "Method"
            },
            {
                "address": "0x102b2c944",
                "name": "TestSwift2.TestString.generateObjectiveCString() -> __C.NSString",
                "type": "Method"
            },
            {
                "address": "0x102b2c9dc",
                "name": "TestSwift2.TestString.convertToObjectiveCString(Swift.String) -> __C.NSString",
                "type": "Method"
            },
            {
                "address": "0x102b2ca3c",
                "name": "TestSwift2.TestString.convertToSwiftString(__C.NSString) -> Swift.String",
                "type": "Method"
            },
            {
                "address": "0x102b2caf0",
                "name": "TestSwift2.TestString.__allocating_init() -> TestSwift2.TestString",
                "type": "Init"
            }
        ]
    },

However, when I try to create the object in Frida, I am getting:

[iPhone::TestSwift2 ]-> var class1 = Swift.classes.TestString
[iPhone::TestSwift2 ]-> var ins1 = class1.__allocating_init()
Error: Type not found: __C.NSString
    at untypedMetadataFor (dist/lib/macho.js:38)
    at ObjectInstance (dist/lib/types.js:414)
    at wrapper (dist/lib/callingconvention.js:120)
    at <eval> (<input>:1)

Am I missing something obvious here? Not sure why it complains about NSString, as the constructor has no defintion of it. I am using the latest version of the bridge from GIT.

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant