Pregunta

Tengo Arg1, que es un iMessage. IMessage se define como:

struct IMessage {
    ...
    struct CFString _field2;
    ...
};

y CFString se define como:

    struct CFString {
    void **_vptr$CFObject;
    struct __CFString *mCFRef;
    _Bool mIsMutable;
};

y __cfstring se define como:

struct __CFString;

Mi objetivo es obtener una cadena de algún tipo, ya sea NSString o CfStringRef de Arg1, entonces, ¿cómo puedo hacerlo? Gracias.

Aquí está el error que recibo cuando intento nslog McFref:

Thread 0 crashed:

#  1  0x97b41edb in _objc_msgSend + 0x0000001B (libobjc.A.dylib + 0x00005edb)
#  2  0x9610b5f2 in __CFStringAppendFormatAndArgumentsAux + 0x00000C42 (CoreFoundation + 0x0002c5f2)
#  3  0x9610a979 in __CFStringCreateWithFormatAndArgumentsAux + 0x00000069 (CoreFoundation + 0x0002b979)
#  4  0x961b3a3e in __CFLogvEx + 0x0000008E (CoreFoundation + 0x000d4a3e)
#  5  0x9415387c in _NSLogv + 0x0000008F (Foundation + 0x0009487c)
#  6  0x941537eb in _NSLog + 0x0000001B (Foundation + 0x000947eb)
¿Fue útil?

Solución

No sé de dónde estás obteniendo esto, pero cfstringref se define como struct __CFString *const, así que ya tienes algo que parece equivalente.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top