1

First let me say I have researched this topic and looked through the following link and it did not help Link 1

I tired un-checking elements in the Attributes Inspector (as described in link1) .

I also tried adding the code to the .plist file as described in LINK 2 and it did not help.

Where I seem to be getting the error is when i execute the following sequence of events using a button to start it:

  • user presses a button

  • alert pops up to ask the user if they wish to proceed

  • if yes a button now becomes un-hidden to allow the user to send data to my domain

  • once the new button is pressed I use a fetch to get a bunch of core data and then send it to my domain using an NSString(data: data!, encoding: NSUTF8StringEncoding)! call

right after all the data is sent to my domain I get the following error every time:

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

It does successfully send the data but the error stays... PLEASE HELP

Community
  • 1
  • 1
  • Seems similar to http://stackoverflow.com/questions/32899586/error-message-bsmacherror-os-kern-invalid-capability-20 – zpasternack Dec 23 '15 at 21:38
  • The link you provided was the first link I provided in my question. That post did not help to resolve my issue. – Just Another Guy Dec 23 '15 at 23:20
  • it also seems to randomly crash during this process. This is so frustrating. My app is ready to be submitted and this is keeping me from doing so.... any help would be appreciated. – Just Another Guy Dec 24 '15 at 14:09

2 Answers2

0

I was getting this error executing not long run operations but some operations that take long on handler blocks of UIAlertActions. I solved by putting operations in a background thread with:

NSOperationQueue().addOperationWithBlock { 
    // Operations Here.
}

Accessing the core data can take longer then you think and accessing it from button handler can make that error appear because some handlers have limited amount of time to respond.

Tunaki
  • 132,869
  • 46
  • 340
  • 423
0

For me this error occurred when I tried to set the button title to an optional string:

self.titleButton.setTitle(self.playlistItem?.title, for: UIControlState())

The error messages do not occur when changed to this:

self.titleButton.setTitle(self.playlistItem!.title, for: UIControlState())

Feel free to post relevant code in your question. Hope this helps...

bio
  • 669
  • 4
  • 14