Cos'è __cfstring?
-
28-10-2019 - |
Domanda
Ho Arg1 che è un iMessage. IMessage è definito come:
struct IMessage {
...
struct CFString _field2;
...
};
e cfstring è definito come:
struct CFString {
void **_vptr$CFObject;
struct __CFString *mCFRef;
_Bool mIsMutable;
};
e __cfstring è definito come:
struct __CFString;
Il mio obiettivo è quello di ottenere una serie di qualche tipo che si tratti di nsstring o cfstringref da Arg1, quindi come posso farlo? Grazie.
Ecco l'errore che ricevo quando provo a 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)
Soluzione
Non so da dove stai ottenendo questo, ma cfstringref è definito come struct __CFString *const
, quindi hai già qualcosa che sembra equivalente.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow