OK, so I'm using C callback functions being run from a CGPDFScanner
. These functions are within a class called PDFContentStreamProcessor
with an NSMutableArray
property called myArray
ARC is enabled, but I made an exception in the build phases for this class.
void RandomCallbackOperatorFunction(CGPDFScannerRef s, void *info) {
PDFContentStreamProcessor * searcher = (PDFContentStreamProcessor*)info;
[searcher setMyArray:[[NSMutableArray alloc] initWithObjects:@"aString",@"AnotherString", nil]];
NSLog(@"arraylength:%i",searcher.myArray.count);
}
It finds text, integers and objects just fine, but I can't do much with the values if I can't store them anywhere. Any ideas?
I've also tried it this way:
[(PDFContentStreamProcessor*)info setMyArray:[[NSMutableArray alloc] initWithObjects:@"aString",@"AnotherString", nil]];
... also with no luck