_BSMachError Xcode 7 Beta

I get the following error when I run my code in Xcode7 using Swift2 after presenting the view controller via the push segment:

_BSMachError: (os/kern) invalid capability (20) _BSMachError: (os/kern) invalid name (15) 

Other SO articles did not have permission, does anyone know about this issue?

+59
xcode xcode7
Sep 01 '15 at
source share
8 answers

Although this problem seems to be saved as a bug and is likely to be fixed, it stems from the new application security> that was implemented in iOS 9.

If your application retrieves data from a web server to populate the View Viewer, which you will submit, you can resolve these errors by confirming / giving access to specific sites (sites) you are pulling.

To solve this problem, you add the following to your .plist application file:

  • You may want to change your ATS exception dictionary to suit your needs.

     <key>NSAppTransportSecurity</key> <dict> <key>NSExceptionDomains</key> <dict> <key>testdomain.com</key> <dict> <key>NSIncludesSubdomains</key> <false/> <key>NSExceptionAllowsInsecureHTTPLoads</key> <false/> <key>NSExceptionRequiresForwardSecrecy</key> <true/> <key>NSExceptionMinimumTLSVersion</key> <string>TLSv1.2</string> <key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key> <false/> <key>NSThirdPartyExceptionRequiresForwardSecrecy</key> <true/> <key>NSThirdPartyExceptionMinimumTLSVersion</key> <string>TLSv1.2</string> <key>NSRequiresCertificateTransparency</key> <false/> </dict> </dict> </dict> 

More information about this solution can be found here or here. Apple's documentation for Application Security in the application is also worth reading.

+21
Sep 23 '15 at 16:10
source share

I had the same two error messages. In my case, errors appeared when I called [[UIApplication sharedApplication] openURL:url] after the user selected a button in the open UIAlertController . I assumed that the warning was trying to close at the same time as I was trying to open the url. So, I introduced a slight delay and the error message disappeared.

 dispatch_after(0.2, dispatch_get_main_queue(), ^{ [[UIApplication sharedApplication] openURL:url]; }); 

Not sure if this helps with your specific problem, but I thought it might be useful to share.

+17
Sep 30 '15 at 13:38
source share

Change the local language of the localization development area in your info.plist file from en to the United States.

+3
Feb 03 '16 at 15:21
source share

Prematurely disabling the view manager can lead to this.

 [self dismissViewControllerAnimated:YES completion:NULL]; //<do something..> 

This causes _BSMachErrors

against

 //<do something..> [self dismissViewControllerAnimated:YES completion:NULL]; 

Now _BSMachError is missing.

+3
Jun 01 '16 at 19:01
source share

I got these errors when I used the keyboard. According to this note at Apple Docs, this was somewhat expected.

http://cocoadocs.org/docsets/Keyboard/0.3.0/

+2
Dec 15 '15 at
source share

I do like this

  dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)) { () -> Void in AnswersDataServerEntity.saveSingleDocoment(doc) } 
+2
Mar 05 '16 at 16:43
source share

Having this statement right below the IBAction button caused a problem.

 self.view.endEditing(true) 

The problem was fixed in Swift 3 by commenting on the line above and handling the end editing differently, or adding the specified line after all other code in IBAction can also be fixed.

0
Jul 08 '16 at 22:00
source share

I had this problem during debugging and it disappeared when I removed the breakpoint in response to resizing the view.

0
Jul 25 '16 at 11:30
source share



All Articles