I just came across this code in Acorn. It’s obviously not used anymore, and dates back to FlySketch. Boy, we used to be able to do anything back then- apps couldn’t get away with this these days because of code signing.

- (IBAction)swapShowInDockPref:(id)sender {

    NSString *infoPlist = [NSString stringWithFormat:@"%@/Contents/Info.plist", [[NSBundle mainBundle] bundlePath]];

    NSDictionary *d = [NSDictionary dictionaryWithContentsOfFile:infoPlist];

    if ([sender state]) {
        [d setValue:@"0" forKey:@"LSUIElement"];
    }
    else {
        [d setValue:@"1" forKey:@"LSUIElement"];
    }

    if (![d writeToFile:infoPlist atomically:YES]) {
        NSBeep();
    }

    NSString *command = [NSString stringWithFormat:@"/usr/bin/touch \"%@\"", [[NSBundle mainBundle] bundlePath]];

    system([command UTF8String]);
}