I'm just starting out trying to use os_activity and have hit an annoyance. Attempting to add a breakpoint to any line of code with os_activity_initiate block does not work as expected. Instead it seems to break after the call to os_activity_initiate.
E.g Consider this:
- (IBAction)doActivity:(id)sender
{
os_activity_initiate("Test Activity", OS_ACTIVITY_FLAG_DEFAULT, ^{
NSLog(@"Doing activity");
NSBeep(); // <<-- Try to add a preakpoint here
NSLog(@"Finished activity");
});
}
Try to put a breakpoint at the NSBeep() line. By the time it fires, both NSLog calls will have already been done.
Only solution I can find is to wrap all such code inside os_activity_initiate blocks into a local block (or other function) but that's no fun.
BTW - Xcode 9.2 Debug configuration and macOS 10.13.2