Error message '_BSMachError: (os/kern) invalid capability (20)'

It's crazy but for me the solution was just to remove all breakpoints in the file where the error occured.

As for the cause? I think I accidentally hit a shortcut key to create a breakpoint in the current line. Because that was unintended I hit the same shortcut key again to delete it.

Oh my dear XCode...


Ok, I haven't pinned it down completely, but this will get you 99% of the way there. I'm using a third party map control from ESRI, and something about it doesn't like one of these drawing settings in the Attributes Inspector. I haven't tried each setting individually to see which setting it is, but when I turned all of them off (in the red box), everything worked like a charm, and I quit getting the error message above in the console. If and when I get time to nail it down to the precise setting or combination of settings, i'll update the answer.

enter image description here


Based on the https://forums.developer.apple.com/thread/15683:

Change "Localization native development region" in info.plist to United States instead of en.

Updated: Then you can revert these changes back.


I also ran into the _BSMachError console errors while deep linking into the Settings app on iOS 9 from a UIAlertController action. A dispatch_async solved my problem:

[aAlertVC addAction:[UIAlertAction actionWithTitle:@"Settings" style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
    dispatch_async(dispatch_get_main_queue(), ^{
        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
    });
}]];