I am hooked into SpringBoard method, i want to wait a certain event to happen and then continue my code, but whatever i try - i think it pauses the main thread and all threads stop then. My code is:
+(void) startc {
while([currentNumber isEqual:@""])
{
NSLog(@"waiting until currentNumber is not empty %@", currentNumber);
}
}
id replaced_SBCallAlert_initWithCall_(id self, SEL _cmd, CTCallRef call) { // Note the
NSLog(@"calling replaced");
[cdBackground startc];
original_SBCallAlert_initWithCall_(sbc, scc, cls);
return NULL;
}
currentNumber is updated in another thread, but this code blocks it.