Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error _BSMachError: (os/kern) invalid capability (20) after receiving remote notification on CloudKit record addition

Tags:

When I receive a remote notification on a record addition (didReceiveRemoteNotification called), I get the following error message:

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

I've already tried to find out more about this in forums and via Google but I could not find any helpful advice that applies to my situation.

What does the error message mean? What can I do about it?

like image 706
vomako Avatar asked Jul 30 '15 09:07

vomako


1 Answers

I just experienced this error. I was in a UIAlert Action block; when the block exited the error occurred (BTW the parent UIAlertViewController was created in a dispatch_async block so was I guess off main thread.

Anyway, I wrapped the action code itself in

dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{         [self handleActionForElement:thisType];        }); 

and error went away. Your mileage may vary!

like image 101
davidey Avatar answered Sep 24 '22 03:09

davidey