在项目中突然遇到一个问题,也就是_BSMachError: (os/kern) invalid capability (20) _BSMachError: (os/kern) invalid name (15)

  虽然该问题对界面展示以及数据保存都没有影响,但是处于本人对于提示错误的洁癖,对于该问题进行了调研.

  错误出现的情景:

- (void)showAlterView {
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"提示" message:@"是否确定放弃本次编辑" preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction *_Nonnull action) {
}];

UIAlertAction *otherAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
[self.navigationController popViewControllerAnimated:YES];
}];
[alertController addAction:cancelAction];
[alertController addAction:otherAction];
[self presentViewController:alertController animated:YES completion:nil];
}

点击确定后返回上一个控制器时会出现这个错误

  解决办法:

- (void)showAlterView {

UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"提示" message:@"是否确定放弃本次编辑" preferredStyle:UIAlertControllerStyleAlert];

UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction *_Nonnull action) {

}];

UIAlertAction *otherAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {

dispatch_async(dispatch_get_main_queue(), ^{

self.introduceTextView.delegate = nil;

[[NSNotificationCenter defaultCenter] removeObserver:self.introduceTextView];

[self.navigationController popViewControllerAnimated:YES];

});

}];

[alertController addAction:cancelAction];

[alertController addAction:otherAction];

[self presentViewController:alertController animated:YES completion:nil];

}

即将alterAction事件放到主线程中去执行.

ps:本人由于精力和时间有限,并没有对该问题进行深入研究,希望同行大神有什么理解还有深入研究,可以告知小女,小女在此谢过各位大牛.

_BSMachError: (os/kern) invalid capability (20) _BSMachError: (os/kern) invalid name (15) 问题的解决的更多相关文章

  1. iOS _BSMachError: (os/kern) invalid capability (20)

    _BSMachError: (os/kern) invalid capability (20) 解决办法:将info.plist里面的en改为United States 2016-04-18 22:4 ...

  2. Python os.path.dirname(__file__) 与 Python os.path.abspath(__file__) 与 os.system() 函数

    Python  os.path.dirname(__file__) 与 Python os.path.abspath(__file__) 的区别 os.path.abspath(__file__)返回 ...

  3. os引导程序boot从扇区拷贝os加载程序loader文件到内存(boot copy kernel to mem in the same method)

    [0]README 0.1) 本代码旨在演示 在boot 代码中,如何 通过 loader文件所在根目录条目 找出该文件的 在 软盘所有全局扇区号(簇号),并执行内存中的 loader 代码: 0.2 ...

  4. python获取某路径下,某种特定类型的文件名称,os.walk(路径)生成器;os.listdir(路径),os.path.splitext(名称),os.path.join(路径,名称),os.path.isdir(路径\名称)

    #获取某文件夹下制定类型文件# import os# def filep(fp):# l=[]# a=os.walk(fp) #生成器# for nowp,sonp,oth in a: #当前目录,子 ...

  5. nuxt/eapress 安装报错Module build failed: ValidationError: PostCSS Loader Invalid OptionsModule build failed: ValidationError: PostCSS Loader Invalid Options options['useConfigFile'] is an invalid additi

    错误信息: Module build failed: ValidationError: PostCSS Loader Invalid Options options['useConfigFile'] ...

  6. x01.os.12: 在 windows 中写 OS

    在 windows 中写操作系统,需要一系列的辅助工具.在此,要感谢川谷秀实!所有工具,都在 z_tools 文件夹中.有了大师的帮助,不妨也来尝试在 windows 中写一把 OS. 源代码及工具可 ...

  7. 关于在Mac OS下安装npm与cnpm的ERR! Darwin 15.0.0解决办法

    mac os安装好了很久了,不过没怎么用,昨天想要体验一下大神们推荐的黑苹果系统用起来怎么样(关于安装黑苹果的可以到我的简书去看相关文章),于是乎,打开久违的vmware,看着咬一口的苹果进度图,心中 ...

  8. Windows下虚拟机安装Mac OS X —– VMware Workstation12安装Mac OS X 10.11

    1下载  镜像:Instal OS X Yosemite 10.10.3(14D131).cdr        密码:qhhm 2 unlocker208文件(链接:https://pan.baidu ...

  9. Mac OS安装octave出现的问题-'error:terminal type set to 'unknown'的解决'

    学习Machine learning需要使用Octave语言,毕竟Andrew Ng (恩达.吴)力荐.本机系统Mac OS X EI Capitan, 其实什么系统都无所谓了,安装原理都是一样的. ...

随机推荐

  1. 记一次排查CPU高的问题

    背景 将log4j.xml的日志级别从error调整为info后,进行压测发现CPU占用很高达到了90%多(之前也就是50%,60%的样子). 问题排查 排查思路:  看进程中的线程到底执行的是什么, ...

  2. Hello World之编译链接装载与执行(1)

    一:前言 我打算写一系列博客来说说我对Hello World在计算机中的生命旅程的理解,我是一名软件工程专业的大三学生,有关这个问题我主要的参考书有<深入理解计算机系统>.<现代操作 ...

  3. github上传和删除文件(三)

    上传文件: git init git add * git commit -m "description" //git remote rm origin 或查看当前 git remo ...

  4. selenium2.x 与 selenium3.x 最大区别

    一.selenium2.x 与 selenium3.x 最大区别 (1) 从3.0版本selenium开始使用火狐浏览器完成web自动化就需要用到驱动包了. (2) 而2.0版本的selenium使用 ...

  5. CentOS8安装VirtualBox,并创建CentOS虚拟机

    安装VirtualBox 执行以下命令并启用VirtualBox和EPEL包仓库 [root@localhost~] dnf config-manager --add-repo=https://dow ...

  6. 工具篇:apache-httpClient 和 jdk11-HttpClient的使用

    关注公众号,一起交流,微信搜一搜: 潜行前行 HttpClient (apache) apache HttpClient 是 java项目里 较为常用的组件之一:对接外部服务时,各个商家提供的接口是各 ...

  7. 这一次,Google 终于对 Web 自动化下手了!

    大家好,我是安果! 最近 Google 对 Chrome 进行了一次比较大的更新,其中一项是脚本录制回放功能,它可以非常方便我们处理一些自动化场景 我们可以在 Chrome 官网下载 Chrome C ...

  8. soft and hard limit

    soft限制了资源使用上限; soft可调整; hard限制了soft上限; 普通用户可使用ulimit -H调低hard limit. 限制的是一个进程可用资源, 而不是某个用户总和. man se ...

  9. python实现图片色素的数值运算(加减乘除)和逻辑运算(与或非异或)

    目录: (一)数值运算(加减乘除) (二)逻辑运算(与或非异或) 正文: (一)数值运算(加减乘除) opencv自带图片色素的处理函数------相加:add()   相减:subtract()  ...

  10. 动图图解!怎么让goroutine跑一半就退出?

    光看标题,大家可能不太理解我说的是啥. 我们平时创建一个协程,跑一段逻辑,代码大概长这样. package main import ( "fmt" "time" ...