As usual, I probably WAY overthought it, and did:
dispatch_async(dispatch_get_main_queue(), ^{
NSRunLoop *myLoop = NSRunLoop.currentRunLoop;
OSStatus kr = SecKeychainAddCallback(MyKeychainEventCallback, kSecEveryEventMask, NULL);
while (1) {
// Keep running, restarting every 10 minutes. We could make
// this a lot longer, though.
[myLoop runUntilDate:[NSDate dateWithTimeIntervalSinceNow:600]];
}
});
Topic:
Privacy & Security
SubTopic:
General
Tags: