This is working for me. Here’s what I did:
I created a Mac app with the code shown below.
I set a breakpoint on line 2 with the condition shown below.
I ran the app and clicked my Test button.
It printed the output shown below and then stopped at my breakpoint with
path
set to /System
. Thus, the breakpoint ignored the first call and stopped on the second.
This is Xcode 7.2.1 on OS X 10.11.3.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"
// From step 1:
- (void)testMethod:(NSString *)path {
NSLog(@"%@", [[NSFileManager defaultManager] attributesOfItemAtPath:path error:NULL]);
}
- (IBAction)testAction:(id)sender {
#pragma unused(sender)
[self testMethod:@"/Applications"];
[self testMethod:@"/System"];
}
// From step 2:
[path isEqualToString:@"/System"]
// From step 4:
… Test[…] {
…
NSFileGroupOwnerAccountName = admin;
NSFileOwnerAccountID = 0;
NSFileOwnerAccountName = root;
…
}